]> source.dussan.org Git - jquery.git/commitdiff
Event: Remove redundant fallback to getPreventDefault()
authorMichał Gołębiowski <m.goleb@gmail.com>
Tue, 18 Mar 2014 22:02:49 +0000 (23:02 +0100)
committerDave Methvin <dave.methvin@gmail.com>
Fri, 21 Mar 2014 03:10:36 +0000 (23:10 -0400)
Android 2.3 is happy with returnValue already used for oldIE;
the getPreventDefault() fallback is not needed.

Closes gh-1546

src/event.js

index f6e26d8b52ccf4ce64e0dac0936bac5b1b0f1667..16ca030bdb3549843a16295d91efe5e534c94a33 100644 (file)
@@ -684,11 +684,9 @@ 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.defaultPrevented === undefined && (
-                               // Support: IE < 9
-                               src.returnValue === false ||
-                               // Support: Android < 4.0
-                               src.getPreventDefault && src.getPreventDefault() ) ?
+                               src.defaultPrevented === undefined &&
+                               // Support: IE < 9, Android < 4.0
+                               src.returnValue === false ?
                        returnTrue :
                        returnFalse;