mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
js: Disable menu keyboard controls when dialogue box is active
I think this is broadly the wrong approach, but it's an improvement until I implement the right one.
This commit is contained in:
@ -458,6 +458,8 @@ function initPuzzle() {
|
|||||||
var cs = window.getComputedStyle(menu);
|
var cs = window.getComputedStyle(menu);
|
||||||
return cs.display == "flex" && cs.flexDirection == "row";
|
return cs.display == "flex" && cs.flexDirection == "row";
|
||||||
}
|
}
|
||||||
|
if (dlg_dimmer !== null)
|
||||||
|
return;
|
||||||
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter",
|
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter",
|
||||||
"Escape", "Backspace", "SoftRight"]
|
"Escape", "Backspace", "SoftRight"]
|
||||||
.includes(event.key))
|
.includes(event.key))
|
||||||
|
Reference in New Issue
Block a user