diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2018-03-07 10:46:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-07 10:46:24 +0100 |
| commit | b918b29f90ef874381987c2209a4615745286524 (patch) | |
| tree | 51708e9941dd188a5ff2ca6dd71816a48cfdbbf0 | |
| parent | 114d443b3c924cbbbdf7a665958ae97e7a9acfdc (diff) | |
| parent | 0314349b086b37d83f74993a94110ca38d36f18d (diff) | |
Merge pull request #1226 from rndevfx/fix-vim-mode-on-firefox
Fix Vim mode on Firefox
| -rw-r--r-- | searx/static/plugins/js/vim_hotkeys.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/static/plugins/js/vim_hotkeys.js b/searx/static/plugins/js/vim_hotkeys.js index 61500d8f5..13bd070e0 100644 --- a/searx/static/plugins/js/vim_hotkeys.js +++ b/searx/static/plugins/js/vim_hotkeys.js @@ -104,7 +104,7 @@ $(document).ready(function() { } }; - $(document).keyup(function(e) { + $(document).keydown(function(e) { // check for modifiers so we don't break browser's hotkeys if (vimKeys.hasOwnProperty(e.keyCode) && !e.ctrlKey @@ -118,6 +118,7 @@ $(document).ready(function() { } } else { if (e.target === document.body) { + e.preventDefault(); vimKeys[e.keyCode].fun(); } } |