JavaScript Method window.close() no longer performs as expected in iOS 8 under Safari
| Originator: | jack | ||
| Number: | rdar://18575729 | Date Originated: | 10/6/14 |
| Status: | Open | Resolved: | |
| Product: | Product Version: | ||
| Classification: | Reproducible: |
This is a duplicate of http://openradar.appspot.com/18477706
Summary:
Calling window.close() in a page in mobile safari does nothing on iOS >=8.0. Previously it would cause the page to close. This causes serious usability issues in many web applications, e.g. Facebook login or Stripe checkout.
Steps to Reproduce:
1. Create a new html file (test.html) viewable from an iOS device running iOS 8
2. Set HTML data for the file:
<html>
<head>
</head>
<body>
<button onclick="window.open('./test-close.html'); return false;">Open B</button>
</body>
3. Create a second new html file (test-close.html) viewable from an iOS device running iOS 8
4. Set HTML data for the file:
<html>
<head>
</head>
<body>
<button onclick="window.close();">Close</button>
</body>
3. Open test.html in Safari
4. Click the "Open" button
5. Second window opens with a "Close" button
6. Click the "Close" button
I can reliably reproduce this and this has been reported elsewhere, https://stackoverflow.com/questions/25804730/window-close-doesnt-work-on-ios-8-gm-seed
This is not an issue in other iOS browsers besides Safari.
Expected Results:
The second window should close
Actual Results:
The second window does not close
Version:
iOS 8.0
Notes:
StackOverflow link:
https://stackoverflow.com/questions/25804730/window-close-doesnt-work-on-ios-8-gm-seed
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!