diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-11-20 17:34:26 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-20 17:34:56 -0400 |
commit | adf8035778d409cd2a57d3a537193b4bdb3f1503 (patch) | |
tree | a062f38a99cb2449da86b0164bd1c4fda5cbb1ee | |
parent | 01ad4dda0d8609fbfb2759cc1bb975b9c6b71c58 (diff) |
client: scripted-link: ignore while input or textarea focused
Fixes #551
-rw-r--r-- | src/static/js/client/scripted-link.js | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |