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 -1
View File
@@ -209,7 +209,9 @@ export function TerminalInput(): React.ReactElement {
// Catch all key inputs and redirect them to the terminal.
useEffect(() => {
function keyDown(this: Document, event: KeyboardEvent): void {
if (Terminal.contractOpen) return;
if (Terminal.contractOpen || Terminal.nsPromptApiOpen) {
return;
}
if (Terminal.action !== null && event.key === KEY.C && event.ctrlKey) {
Terminal.finishAction(true);
return;