From 36c9062cbd01024610032e8a31b66ef12a7c11d9 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 24 Nov 2022 18:26:59 +0000 Subject: [PATCH] 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. --- emccpre.js | 2 ++ 1 file changed, 2 insertions(+) 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))