diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-24 18:26:59 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-11-24 18:26:59 +0000 |
| commit | 36c9062cbd01024610032e8a31b66ef12a7c11d9 (patch) | |
| tree | 1cf7bbc2ea40cd0cb69fb34636dfeb78dd478187 | |
| parent | 271fb7f47c060bf7ebb34e3cb71fc1b47aa23723 (diff) | |
| download | puzzles-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.
| -rw-r--r-- | emccpre.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)) |