diff --git a/test/unit/event.js b/test/unit/event.js index 5c136afeb..781fba5f2 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1400,7 +1400,10 @@ test("Submit event can be stopped (#11049)", function() { }); // 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() { var win, forIE6 = 0,