mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 16:26:18 +08:00
Merge pull request #422 from willerbee/patch-1
FIX: can't close leaderboards using keyboard (Esc)
This commit is contained in:
commit
abe781ba25
|
@ -1351,7 +1351,11 @@ $(document).ready((e) => {
|
|||
//escape
|
||||
if ((event.keyCode == 27 && !config.swapEscAndTab) || (event["keyCode"] == 9 && config.swapEscAndTab)) {
|
||||
event.preventDefault();
|
||||
if ($("#commandLineWrapper").hasClass("hidden")) {
|
||||
if (!$("#leaderboardsWrapper").hasClass("hidden")) { //maybe add more condition for closing other dialogs in the future as well
|
||||
event.preventDefault();
|
||||
hideLeaderboards();
|
||||
return;
|
||||
} else if ($("#commandLineWrapper").hasClass("hidden")) {
|
||||
currentCommands = [commands];
|
||||
showCommandLine();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue