Skip to content

Build your personal knowledge base with Trilium Notes

fix non-handled keyboard events coming from code mirror

azivnerd8b7763deaa9
diff --git a/public/libraries/jquery.hotkeys.js b/public/libraries/jquery.hotkeys.js
index 0d38046d7f..41740a830a 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;
}