mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Tests: Blacklist beforeunload test in iOS
iOS has the window.onbeforeunload field but doesn't support the beforeunload
handler making it impossible to feature-detect the support.
(cherry-picked from 988d99ad27
)
Fixes #14717
Closes gh-1496
This commit is contained in:
parent
d2c37afdd5
commit
42b740bc02
@ -1400,7 +1400,10 @@ test("Submit event can be stopped (#11049)", function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Test beforeunload event only if it supported (i.e. not Opera)
|
// Test beforeunload event only if it supported (i.e. not Opera)
|
||||||
if ( window.onbeforeunload === null ) {
|
// Support: iOS 7+
|
||||||
|
// iOS has the window.onbeforeunload field but doesn't support the beforeunload
|
||||||
|
// handler making it impossible to feature-detect the support.
|
||||||
|
if ( window.onbeforeunload === null && !/(ipad|iphone|ipod)/i.test( navigator.userAgent ) ) {
|
||||||
asyncTest("on(beforeunload)", 4, function() {
|
asyncTest("on(beforeunload)", 4, function() {
|
||||||
var win,
|
var win,
|
||||||
forIE6 = 0,
|
forIE6 = 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user