mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 21:09:18 +08:00
fixed command line not staying in single mode
This commit is contained in:
parent
ba4e35710e
commit
9df3996559
1 changed files with 14 additions and 7 deletions
|
@ -527,13 +527,20 @@ $(document).keydown((e) => {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (
|
||||
e.key === "Backspace" &&
|
||||
$("#commandLine input").val()[0] == ">" &&
|
||||
Config.singleListCommandLine == "manual" &&
|
||||
isSingleListCommandLineActive()
|
||||
)
|
||||
restoreOldCommandLine(false);
|
||||
|
||||
if (e.key === "Backspace") {
|
||||
setTimeout(() => {
|
||||
let inputVal = $("#commandLine input").val();
|
||||
if (
|
||||
Config.singleListCommandLine == "manual" &&
|
||||
isSingleListCommandLineActive() &&
|
||||
inputVal[0] !== ">"
|
||||
) {
|
||||
restoreOldCommandLine();
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
|
||||
if (e.key === "Enter") {
|
||||
//enter
|
||||
e.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue