Ensure correct behaviour of Esc key in overlays
This commit is contained in:
parent
58f17e00b0
commit
36eb43ed8d
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "minesweeper",
|
||||
"version": "0.82.14",
|
||||
"version": "0.82.15",
|
||||
"description": "Just Minesweeper!",
|
||||
"author": "Florine W. Dekker",
|
||||
"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 {
|
||||
// @ts-ignore
|
||||
|
|
|
@ -82,6 +82,6 @@ export class Overlay {
|
|||
* Returns `true` if and only if this overlay is currently visible.
|
||||
*/
|
||||
isVisible(): boolean {
|
||||
return this.overlay.classList.contains("hidden");
|
||||
return !this.overlay.classList.contains("hidden");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue