mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 19:14:32 +02:00
UI: Ensure prompts shown by ns.prompt do not lose focus in the terminal tab (#2631)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user