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:
Dave Methvin 2013-09-19 09:53:08 -04:00
parent a4d90ab5d8
commit 60004e68f8

View File

@ -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 {