Ensure correct behaviour of Esc key in overlays

This commit is contained in:
Florine W. Dekker 2022-03-15 19:10:30 +01:00
parent 58f17e00b0
commit 36eb43ed8d
Signed by: FWDekker
GPG Key ID: D3DCFAA8A4560BE0
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "minesweeper", "name": "minesweeper",
"version": "0.82.14", "version": "0.82.15",
"description": "Just Minesweeper!", "description": "Just Minesweeper!",
"author": "Florine W. Dekker", "author": "Florine W. Dekker",
"browser": "dist/bundle.js", "browser": "dist/bundle.js",

View File

@ -3,7 +3,7 @@ import alea from "alea";
/** /**
* Blurs the currently active element, if possible. * Removes focus from the currently active element, if possible.
*/ */
export function blurActiveElement(): void { export function blurActiveElement(): void {
// @ts-ignore // @ts-ignore

View File

@ -82,6 +82,6 @@ export class Overlay {
* Returns `true` if and only if this overlay is currently visible. * Returns `true` if and only if this overlay is currently visible.
*/ */
isVisible(): boolean { isVisible(): boolean {
return this.overlay.classList.contains("hidden"); return !this.overlay.classList.contains("hidden");
} }
} }