From 7326c0467e8483722b449a800042c6c89773afb0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?= Date: Tue, 18 Mar 2014 21:00:42 +0100 Subject: [PATCH] Event: Don't test stopImmediatePropagation in Android 2.3 Android 2.3 doesn't support stopImmediatePropagation; jQuery fallbacks to stopPropagation in such a case. --- test/unit/event.js | 7 +++++-- 1 file 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(); -- 2.39.5