From d8b7763deaa9cd3b808a0d446d1daba16ab1d7f7 Mon Sep 17 00:00:00 2001 From: azivner Date: Mon, 22 Jan 2018 21:29:56 -0500 Subject: [PATCH] fix non-handled keyboard events coming from code mirror --- public/libraries/jquery.hotkeys.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/libraries/jquery.hotkeys.js b/public/libraries/jquery.hotkeys.js index 0d38046d7..41740a830 100644 --- a/public/libraries/jquery.hotkeys.js +++ b/public/libraries/jquery.hotkeys.js @@ -138,11 +138,9 @@ keys = handleObj.data.keys.toLowerCase().split(" "); handleObj.handler = function(event) { - // Don't fire in text-accepting inputs that we didn't directly bind to - if (this !== event.target && (/textarea|select/i.test(event.target.nodeName) || - (jQuery.hotkeys.options.filterTextInputs && + if (jQuery.hotkeys.options.filterTextInputs && event.target.tagName != 'WEBVIEW' && - jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) { + jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1) { return; }