Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #14282. Don't fondle getPreventDefault if preventDefault exists. C…
…lose gh-1365.

(cherry picked from commit 4671ef1)

Conflicts:
	src/event.js
  • Loading branch information
dmethvin committed Sep 19, 2013
1 parent a4d90ab commit 60004e6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/event.js
Expand Up @@ -680,8 +680,14 @@ jQuery.Event = function( src, props ) {

// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
this.isDefaultPrevented = src.defaultPrevented ||
src.defaultPrevented === undefined && (
// Support: IE < 9
src.returnValue === false ||
// Support: Android < 4.0
src.getPreventDefault && src.getPreventDefault() ) ?
returnTrue :
returnFalse;

// Event type
} else {
Expand Down

0 comments on commit 60004e6

Please sign in to comment.