mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
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:
parent
7f5a0df20c
commit
7326c0467e
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user