mirror of
https://github.com/jquery/jquery.git
synced 2026-02-14 12:34:56 -05:00
Event: Blacklist the onbeforeunload test in Android 2.3
Similarly to iOS, Android 2.3 has the onbeforeunload property on window
but doesn't support the event. This commit blacklists the test there as well.
(cherry-picked from 6d2ab64df7)
This commit is contained in:
@@ -1400,10 +1400,11 @@ test("Submit event can be stopped (#11049)", function() {
|
||||
});
|
||||
|
||||
// Test beforeunload event only if it supported (i.e. not Opera)
|
||||
// Support: iOS 7+
|
||||
// iOS has the window.onbeforeunload field but doesn't support the beforeunload
|
||||
// Support: iOS 7+, Android<4.0
|
||||
// iOS & old Android have the window.onbeforeunload field but don't support the beforeunload
|
||||
// handler making it impossible to feature-detect the support.
|
||||
if ( window.onbeforeunload === null && !/(ipad|iphone|ipod)/i.test( navigator.userAgent ) ) {
|
||||
if ( window.onbeforeunload === null &&
|
||||
!/(ipad|iphone|ipod|android 2\.3)/i.test( navigator.userAgent ) ) {
|
||||
asyncTest("on(beforeunload)", 4, function() {
|
||||
var win,
|
||||
forIE6 = 0,
|
||||
|
||||
Reference in New Issue
Block a user