diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2014-03-18 21:00:42 +0100 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2014-03-18 21:00:42 +0100 |
commit | 7326c0467e8483722b449a800042c6c89773afb0 (patch) | |
tree | a292ebec1ef7500ddab80761cb027825c51d1958 /test/unit/event.js | |
parent | 7f5a0df20cc11df0cd3ceef9c296f37a39b73341 (diff) | |
download | jquery-7326c0467e8483722b449a800042c6c89773afb0.tar.gz jquery-7326c0467e8483722b449a800042c6c89773afb0.zip |
Event: Don't test stopImmediatePropagation in Android 2.3
Android 2.3 doesn't support stopImmediatePropagation; jQuery fallbacks
to stopPropagation in such a case.
Diffstat (limited to 'test/unit/event.js')
-rw-r--r-- | test/unit/event.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/unit/event.js b/test/unit/event.js index 4dc6ab83b..8bb168a40 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -431,8 +431,11 @@ test("on bubbling, isDefaultPrevented, stopImmediatePropagation", function() { $anchor2.off( "click" ); $main.off( "click", "**" ); - if ( !window.addEventListener ) { - ok( true, "Old IE, skipping native stopImmediatePropagation check" ); + // Android 2.3 doesn't support stopImmediatePropagation; jQuery fallbacks to stopPropagation + // in such a case. + // Support: Android 2.3 + if ( !window.addEventListener || /android 2\.3/i.test( navigator.userAgent ) ) { + ok( true, "Old IE or Android 2.3, skipping native stopImmediatePropagation check" ); } else { $anchor2.on( "click", function( e ) { e.stopImmediatePropagation(); |