Refactor ZenGlanceManager.mjs to close glance only when Escape key is pressed and there is a current browser

This commit is contained in:
mr. M 2024-10-30 20:49:29 +01:00
parent 43be9a44c5
commit 6db4adf0f6
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB

View file

@ -65,7 +65,7 @@
}
onKeyDown(event) {
if (event.key === "Escape") {
if (event.key === "Escape" && this.#currentBrowser) {
this.closeGlance();
}
}