Fix swapEscAndTab sometimes failing on Esc

This commit is contained in:
SeerLite 2021-01-06 15:28:13 -03:00
parent a7da94fc50
commit 4d8ba85b83

View file

@ -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);
}
}
}
}