Ensure correct behaviour of Esc key in overlays
This commit is contained in:
parent
58f17e00b0
commit
36eb43ed8d
|
@ -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",
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue