Skip to content

Commit

Permalink
fix: don't jump away from form input to search bar
Browse files Browse the repository at this point in the history
Addresses rust-lang#1020 with the suggestion from prior PR rust-lang#1101
  • Loading branch information
brycefisher authored Jun 4, 2020
1 parent 76e11c4 commit fcc60f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/theme/searcher/searcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,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') { return; }
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.target.type === 'textarea' || e.target.type === 'text') { return; }

if (e.keyCode === ESCAPE_KEYCODE) {
e.preventDefault();
Expand Down

0 comments on commit fcc60f3

Please sign in to comment.