mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-11 08:14:11 +08:00
Merge pull request #803 from SeerLite/esc-fix
Fix swapEscAndTab sometimes failing on Esc
This commit is contained in:
commit
876378c842
1 changed files with 18 additions and 19 deletions
|
@ -1777,27 +1777,26 @@ $(document).ready((e) => {
|
|||
event.preventDefault();
|
||||
hideLeaderboards();
|
||||
return;
|
||||
} else if (
|
||||
$("#commandLineWrapper").hasClass("hidden") &&
|
||||
(event.keyCode == 9 || !config.swapEscAndTab)
|
||||
) {
|
||||
if (config.singleListCommandLine == "on")
|
||||
useSingleListCommandLine(false);
|
||||
else currentCommands = [commands];
|
||||
showCommandLine();
|
||||
} else {
|
||||
if (currentCommands.length > 1) {
|
||||
currentCommands.pop();
|
||||
$("#commandLine").removeClass("allCommands");
|
||||
} else if (event.keyCode == 9 || !config.swapEscAndTab) {
|
||||
if ($("#commandLineWrapper").hasClass("hidden")) {
|
||||
if (config.singleListCommandLine == "on")
|
||||
useSingleListCommandLine(false);
|
||||
else currentCommands = [commands];
|
||||
showCommandLine();
|
||||
} else {
|
||||
hideCommandLine();
|
||||
}
|
||||
setFontFamily(config.fontFamily, true);
|
||||
if (config.customTheme === true) {
|
||||
applyCustomThemeColors();
|
||||
} else {
|
||||
setTheme(config.theme);
|
||||
if (currentCommands.length > 1) {
|
||||
currentCommands.pop();
|
||||
$("#commandLine").removeClass("allCommands");
|
||||
showCommandLine();
|
||||
} else {
|
||||
hideCommandLine();
|
||||
}
|
||||
setFontFamily(config.fontFamily, true);
|
||||
if (config.customTheme === true) {
|
||||
applyCustomThemeColors();
|
||||
} else {
|
||||
setTheme(config.theme);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue