Event: Don't test stopImmediatePropagation in Android 2.3

Android 2.3 doesn't support stopImmediatePropagation; jQuery fallbacks
to stopPropagation in such a case.
This commit is contained in:
Michał Gołębiowski 2014-03-18 21:00:42 +01:00
parent 7f5a0df20c
commit 7326c0467e

View File

@ -431,8 +431,11 @@ test("on bubbling, isDefaultPrevented, stopImmediatePropagation", function() {
$anchor2.off( "click" ); $anchor2.off( "click" );
$main.off( "click", "**" ); $main.off( "click", "**" );
if ( !window.addEventListener ) { // Android 2.3 doesn't support stopImmediatePropagation; jQuery fallbacks to stopPropagation
ok( true, "Old IE, skipping native stopImmediatePropagation check" ); // 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 { } else {
$anchor2.on( "click", function( e ) { $anchor2.on( "click", function( e ) {
e.stopImmediatePropagation(); e.stopImmediatePropagation();