Skip to content

Commit

Permalink
Merge pull request rust-lang#1244 from brycefisher/dont-open-search-b…
Browse files Browse the repository at this point in the history
…ar-when-in-text-input

fix: don't jump away from form input to search bar
  • Loading branch information
ehuss authored Jun 7, 2020
2 parents d38574e + fcc60f3 commit 649cad3
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 649cad3

Please sign in to comment.