aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/event.js
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2014-03-18 21:00:42 +0100
committerMichał Gołębiowski <m.goleb@gmail.com>2014-03-18 21:00:42 +0100
commit7326c0467e8483722b449a800042c6c89773afb0 (patch)
treea292ebec1ef7500ddab80761cb027825c51d1958 /test/unit/event.js
parent7f5a0df20cc11df0cd3ceef9c296f37a39b73341 (diff)
downloadjquery-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.js7
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();