Prevent search from triggering when editing code (#653)
This commit is contained in:
parent
55f7ed1c37
commit
148c806e34
|
@ -297,7 +297,7 @@ window.search = window.search || {};
|
||||||
|
|
||||||
// Eventhandler for keyevents on `document`
|
// Eventhandler for keyevents on `document`
|
||||||
function globalKeyHandler(e) {
|
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) {
|
if (e.keyCode == ESCAPE_KEYCODE) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Reference in New Issue