From 7bc952bcfae3a7335e464b4e97989df65474b105 Mon Sep 17 00:00:00 2001 From: Chris Deeming Date: Fri, 17 Jul 2020 15:42:16 +0100 Subject: [PATCH] Prevent keyboard shortcuts in *[contenteditable] In addition to other input type elements, also prevent keyboard shortcuts while inside any element with a contenteditable attribute. --- src/js/core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/core.js b/src/js/core.js index 998995ed..3eb2ac40 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -936,7 +936,7 @@ // Enable keyboard navigation // ========================== - if (!current.opts.keyboard || e.ctrlKey || e.altKey || e.shiftKey || $(e.target).is("input,textarea,video,audio,select")) { + if (!current.opts.keyboard || e.ctrlKey || e.altKey || e.shiftKey || $(e.target).is("input,textarea,video,audio,select,*[contenteditable]")) { return; } @@ -3422,4 +3422,4 @@ } }); })(); -})(window, document, jQuery); \ No newline at end of file +})(window, document, jQuery);