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