mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-07 22:23:45 +08:00
Fix some popups not closing using Esc (#2005) by CrumblyLiquid
* Fix quoteSearchPopup being unresponsive to Esc * Fix customWordAmountPopup not reacting to Esc * Fix customTestDurationPopup not reacting to Esc
This commit is contained in:
parent
bb10006a0a
commit
e33eb4f7f6
3 changed files with 6 additions and 2 deletions
|
@ -9,6 +9,7 @@ import * as SimplePopups from "./simple-popups";
|
|||
import * as CustomWordAmountPopup from "./custom-word-amount-popup";
|
||||
import * as CustomTestDurationPopup from "./custom-test-duration-popup";
|
||||
import * as CustomTextPopup from "./custom-text-popup";
|
||||
import * as QuoteSearchPopupWrapper from "./quote-search-popup";
|
||||
|
||||
let commandLineMouseMode = false;
|
||||
|
||||
|
@ -360,6 +361,9 @@ $(document).ready((e) => {
|
|||
} else if (!$("#customTextPopupWrapper").hasClass("hidden")) {
|
||||
event.preventDefault();
|
||||
CustomTextPopup.hide();
|
||||
} else if (!$("#quoteSearchPopupWrapper").hasClass("hidden")) {
|
||||
event.preventDefault();
|
||||
QuoteSearchPopupWrapper.hide();
|
||||
} else if (!$("#commandLineWrapper").hasClass("hidden")) {
|
||||
if (CommandlineLists.current.length > 1) {
|
||||
CommandlineLists.current.pop();
|
||||
|
|
|
@ -81,7 +81,7 @@ export function show() {
|
|||
previewDuration();
|
||||
}
|
||||
|
||||
function hide() {
|
||||
export function hide() {
|
||||
if (!$("#customTestDurationPopupWrapper").hasClass("hidden")) {
|
||||
$("#customTestDurationPopupWrapper")
|
||||
.stop(true, true)
|
||||
|
|
|
@ -15,7 +15,7 @@ export function show() {
|
|||
}
|
||||
}
|
||||
|
||||
function hide() {
|
||||
export function hide() {
|
||||
if (!$("#customWordAmountPopupWrapper").hasClass("hidden")) {
|
||||
$("#customWordAmountPopupWrapper")
|
||||
.stop(true, true)
|
||||
|
|
Loading…
Add table
Reference in a new issue