Merge pull request #803 from SeerLite/esc-fix

Fix swapEscAndTab sometimes failing on Esc
This commit is contained in:
Jack 2021-01-06 20:55:56 +00:00 committed by GitHub
commit 876378c842
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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