From adf8035778d409cd2a57d3a537193b4bdb3f1503 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 20 Nov 2024 17:34:26 -0400 Subject: client: scripted-link: ignore while input or textarea focused Fixes #551 --- src/static/js/client/scripted-link.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/static/js/client') diff --git a/src/static/js/client/scripted-link.js b/src/static/js/client/scripted-link.js index ca1c2548..8b8d8a13 100644 --- a/src/static/js/client/scripted-link.js +++ b/src/static/js/client/scripted-link.js @@ -208,6 +208,11 @@ function mutateNavigationLinkContent() { function addNavigationKeyPressListeners() { document.addEventListener('keypress', (event) => { + const {tagName} = document.activeElement ?? {}; + if (tagName === 'INPUT' || tagName === 'TEXTAREA') { + return; + } + if (event.shiftKey) { if (event.charCode === 'N'.charCodeAt(0)) { info.nextNavLink?.click(); -- cgit 1.3.0-6-gf8a5