]> source.dussan.org Git - jquery.git/commitdiff
Event: Fix isDefaultPrevented for bubbled events in Android 2.3
authorMichał Gołębiowski <m.goleb@gmail.com>
Tue, 18 Mar 2014 21:38:08 +0000 (22:38 +0100)
committerDave Methvin <dave.methvin@gmail.com>
Fri, 21 Mar 2014 03:16:30 +0000 (23:16 -0400)
Fixes #14897
Closes gh-1545

src/event.js

index b08fde6a78d7da933e25442a62faad046eee05f5..f38d70a40d14e8142caee7a81d083c41d9b999fa 100644 (file)
@@ -634,9 +634,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 ||
-                               // Support: Android < 4.0
                                src.defaultPrevented === undefined &&
-                               src.getPreventDefault && src.getPreventDefault() ?
+                               // Support: Android < 4.0
+                               src.returnValue === false ?
                        returnTrue :
                        returnFalse;