UI: Ensure prompts shown by ns.prompt do not lose focus in the terminal tab (#2631)

This commit is contained in:
catloversg
2026-04-05 06:39:06 +07:00
committed by GitHub
parent eb4e193fac
commit 996bb01075
4 changed files with 14 additions and 1 deletions
+3
View File
@@ -7,6 +7,7 @@ import Select, { SelectChangeEvent } from "@mui/material/Select";
import TextField from "@mui/material/TextField";
import MenuItem from "@mui/material/MenuItem";
import { KEY } from "../../utils/KeyboardEventKey";
import { Terminal } from "../../Terminal";
export const PromptEvent = new EventEmitter<[Prompt]>();
@@ -60,6 +61,8 @@ export function PromptManager({ hidden }: { hidden: boolean }): React.ReactEleme
setPrompt(null);
};
Terminal.nsPromptApiOpen = !hidden && prompt !== null;
return (
<Modal open={!hidden && prompt !== null} onClose={close}>
{prompt && (