mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fix #14282. Don't fondle getPreventDefault if preventDefault exists. Close gh-1365.
(cherry picked from commit 4671ef15c2
)
Conflicts:
src/event.js
This commit is contained in:
parent
a4d90ab5d8
commit
60004e68f8
10
src/event.js
10
src/event.js
@ -680,8 +680,14 @@ jQuery.Event = function( src, props ) {
|
|||||||
|
|
||||||
// Events bubbling up the document may have been marked as prevented
|
// Events bubbling up the document may have been marked as prevented
|
||||||
// by a handler lower down the tree; reflect the correct value.
|
// by a handler lower down the tree; reflect the correct value.
|
||||||
this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
|
this.isDefaultPrevented = src.defaultPrevented ||
|
||||||
src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
|
src.defaultPrevented === undefined && (
|
||||||
|
// Support: IE < 9
|
||||||
|
src.returnValue === false ||
|
||||||
|
// Support: Android < 4.0
|
||||||
|
src.getPreventDefault && src.getPreventDefault() ) ?
|
||||||
|
returnTrue :
|
||||||
|
returnFalse;
|
||||||
|
|
||||||
// Event type
|
// Event type
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user