From 9fc9f1ab7dcaa3cee9e226061df6a320f8626aad Mon Sep 17 00:00:00 2001 From: Dominik Reh Date: Mon, 17 Oct 2022 13:56:15 +0200 Subject: [PATCH] Don't capture keydown if CTRL or ALT is held Prevents the script from blocking weight editing and prompt submit shortcuts Fixes #19 --- javascript/tagAutocomplete.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index 7e9dad4..c79cb17 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -458,6 +458,8 @@ function navigateInList(textArea, event) { if (!validKeys.includes(event.key)) return; if (!isVisible(textArea)) return + // Return if ctrl key is pressed to not interfere with weight editing shortcut + if (event.ctrlKey || event.altKey) return; switch (event.key) { case "ArrowUp":