Skip to content

Commit f711ee2

Browse files
committed
MAGETWO-89661: Manually patch jquery.hotkeys.js to fix content editable space issue
- Ensure contenteditable areas work as expected
1 parent 27b6edd commit f711ee2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/web/jquery/jstree/jquery.hotkeys.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@
4848

4949
handleObj.handler = function( event ) {
5050
// Don't fire in text-accepting inputs that we didn't directly bind to
51+
/**
52+
* Modified by Magento to ensure it doesn't fire on any content editable areas. This library is no
53+
* longer maintained by its author however we require content editable to behave as expected.
54+
*/
5155
if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
52-
event.target.type === "text") ) {
56+
event.target.type === "text" || jQuery(event.target).attr('contenteditable')) ) {
5357
return;
5458
}
5559

0 commit comments

Comments
 (0)