Fix bug where users are unable to re-enter disconnected terminals. (#8765)

This commit is contained in:
Jacob Richman
2025-09-20 10:59:37 -07:00
committed by GitHub
parent 2216856e3c
commit 375b8522fc
15 changed files with 267 additions and 55 deletions

View File

@@ -388,6 +388,9 @@ export function KeypressProvider({
};
const handleKeypress = (_: unknown, key: Key) => {
if (key.sequence === FOCUS_IN || key.sequence === FOCUS_OUT) {
return;
}
if (key.name === 'paste-start') {
isPaste = true;
return;

View File

@@ -6,6 +6,6 @@
import { createContext, useContext } from 'react';
export const FocusContext = createContext<boolean>(true);
export const ShellFocusContext = createContext<boolean>(true);
export const useFocusState = () => useContext(FocusContext);
export const useShellFocusState = () => useContext(ShellFocusContext);

View File

@@ -110,7 +110,7 @@ export interface UIState {
isRestarting: boolean;
extensionsUpdateState: Map<string, ExtensionUpdateState>;
activePtyId: number | undefined;
shellFocused: boolean;
embeddedShellFocused: boolean;
}
export const UIStateContext = createContext<UIState | null>(null);