aboutsummaryrefslogtreecommitdiff
path: root/emccpre.js
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-11-24 18:26:59 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-11-24 18:26:59 +0000
commit36c9062cbd01024610032e8a31b66ef12a7c11d9 (patch)
tree1cf7bbc2ea40cd0cb69fb34636dfeb78dd478187 /emccpre.js
parent271fb7f47c060bf7ebb34e3cb71fc1b47aa23723 (diff)
downloadpuzzles-36c9062cbd01024610032e8a31b66ef12a7c11d9.zip
puzzles-36c9062cbd01024610032e8a31b66ef12a7c11d9.tar.gz
puzzles-36c9062cbd01024610032e8a31b66ef12a7c11d9.tar.bz2
puzzles-36c9062cbd01024610032e8a31b66ef12a7c11d9.tar.xz
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.
Diffstat (limited to 'emccpre.js')
-rw-r--r--emccpre.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/emccpre.js b/emccpre.js
index e5cbb05..a22001b 100644
--- a/emccpre.js
+++ b/emccpre.js
@@ -458,6 +458,8 @@ function initPuzzle() {
var cs = window.getComputedStyle(menu);
return cs.display == "flex" && cs.flexDirection == "row";
}
+ if (dlg_dimmer !== null)
+ return;
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Enter",
"Escape", "Backspace", "SoftRight"]
.includes(event.key))