e.isDefaultPrevented is a jQuery property, but the event passed might be a native browser event, so we should also check for "defaultPrevented" if the jQuery props don't exist.

This commit is contained in:
Dan Howe 2016-06-23 10:11:18 +10:00
parent 9016f207e9
commit 3eb2a49109

View File

@ -40,7 +40,7 @@ function bindKeyboardHandler(element, i) {
} }
i.event.bind(i.ownerDocument, 'keydown', function (e) { i.event.bind(i.ownerDocument, 'keydown', function (e) {
if (e.isDefaultPrevented && e.isDefaultPrevented()) { if (e.isDefaultPrevented && e.isDefaultPrevented() || e.defaultPrevented) {
return; return;
} }