aboutsummaryrefslogtreecommitdiffhomepage
path: root/searcher.js
diff options
context:
space:
mode:
Diffstat (limited to 'searcher.js')
-rw-r--r--searcher.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/searcher.js b/searcher.js
index d2b0aee..dc03e0a 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();