diff --git a/src/js/commandline.js b/src/js/commandline.js index 7289504d6..8f095c285 100644 --- a/src/js/commandline.js +++ b/src/js/commandline.js @@ -1776,28 +1776,25 @@ $(document).ready((e) => { //maybe add more condition for closing other dialogs in the future as well event.preventDefault(); hideLeaderboards(); - return; - } else if (event.keyCode == 9 || !config.swapEscAndTab) { - if ($("#commandLineWrapper").hasClass("hidden")) { - if (config.singleListCommandLine == "on") - useSingleListCommandLine(false); - else currentCommands = [commands]; + } else if (!$("#commandLineWrapper").hasClass("hidden")) { + if (currentCommands.length > 1) { + currentCommands.pop(); + $("#commandLine").removeClass("allCommands"); showCommandLine(); } else { - 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); - } + hideCommandLine(); } + setFontFamily(config.fontFamily, true); + if (config.customTheme === true) { + applyCustomThemeColors(); + } else { + setTheme(config.theme); + } + } else if (event.keyCode == 9 || !config.swapEscAndTab) { + if (config.singleListCommandLine == "on") + useSingleListCommandLine(false); + else currentCommands = [commands]; + showCommandLine(); } } }); diff --git a/src/js/script.js b/src/js/script.js index 2bc091c5d..56ff92331 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -4601,8 +4601,7 @@ function handleTab(event) { !$(".pageLogin").hasClass("active") && !resultCalculating && $("#commandLineWrapper").hasClass("hidden") && - $("#simplePopupWrapper").hasClass("hidden") && - $("#leaderboardsWrapper").hasClass("hidden") + $("#simplePopupWrapper").hasClass("hidden") ) { event.preventDefault(); if ($(".pageTest").hasClass("active")) {