diff options
author | omentic | 2024-05-01 23:29:52 +0000 |
---|---|---|
committer | omentic | 2024-05-01 23:29:52 +0000 |
commit | 2244a5d40c83d477839f91cb6d6a4aeb02446a97 (patch) | |
tree | 732f056b43a7efbf5b2a75fda060a4cd5b87df66 /searcher.js | |
parent | 313d5f75a7406da11e5b9424857be19866022e3e (diff) |
deploy: 12eec890240a05d1e090114f7f4fdd7c1ee8ff88
Diffstat (limited to 'searcher.js')
-rw-r--r-- | searcher.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searcher.js b/searcher.js index d2b0aeed..dc03e0a0 100644 --- a/searcher.js +++ b/searcher.js @@ -316,7 +316,7 @@ window.search = window.search || {}; // Eventhandler for keyevents on `document` function globalKeyHandler(e) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.target.type === 'textarea' || e.target.type === 'text') { return; } + if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.target.type === 'textarea' || e.target.type === 'text' || !hasFocus() && /^(?:input|select|textarea)$/i.test(e.target.nodeName)) { return; } if (e.keyCode === ESCAPE_KEYCODE) { e.preventDefault(); |