aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/script.js b/script.js
index 44950090..354154b0 100644
--- a/script.js
+++ b/script.js
@@ -163,11 +163,13 @@ document.addEventListener('keydown', function(e) {
}
if (isEsc) {
+ const globalPopup = document.querySelector('.global-popup');
if (!globalPopup || globalPopup.style.display === "none") {
interruptButton.click();
e.preventDefault();
} else {
- closePopup();
+ if (!globalPopup) return;
+ globalPopup.style.display = "none";
}
}
});