Prevent search from triggering when editing code (#653)

This commit is contained in:
Nils 2018-04-07 00:31:51 +02:00 committed by Michael Bryan
parent 55f7ed1c37
commit 148c806e34
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ window.search = window.search || {};
// Eventhandler for keyevents on `document`
function globalKeyHandler(e) {
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; }
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.target.type === 'textarea') { return; }
if (e.keyCode == ESCAPE_KEYCODE) {
e.preventDefault();