mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-10 08:55:37 +08:00
fixed a bug where you could type while leaderobards are visible
This commit is contained in:
parent
9fe5d76745
commit
77f5277419
1 changed files with 3 additions and 1 deletions
|
@ -828,6 +828,7 @@ $(document).keydown(function (event) {
|
|||
//autofocus
|
||||
let pageTestActive = !$(".pageTest").hasClass("hidden");
|
||||
let commandLineVisible = !$("#commandLineWrapper").hasClass("hidden");
|
||||
let leaderboardsVisible = !$("#leaderboardsWrapper").hasClass("hidden");
|
||||
let wordsFocused = $("#wordsInput").is(":focus");
|
||||
let modePopupVisible =
|
||||
!$("#customTextPopupWrapper").hasClass("hidden") ||
|
||||
|
@ -838,6 +839,7 @@ $(document).keydown(function (event) {
|
|||
if (
|
||||
pageTestActive &&
|
||||
!commandLineVisible &&
|
||||
!leaderboardsVisible &&
|
||||
!modePopupVisible &&
|
||||
!TestUI.resultVisible &&
|
||||
!wordsFocused &&
|
||||
|
@ -893,7 +895,7 @@ $(document).keydown(function (event) {
|
|||
handleSpace(event, false);
|
||||
}
|
||||
|
||||
if (wordsFocused && !commandLineVisible) {
|
||||
if (wordsFocused && !commandLineVisible && !leaderboardsVisible) {
|
||||
handleAlpha(event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue