We have an iPad application that\'s working on our older iPads.
We open external links using var x = window.open(url)
at the end of the day, when the user cl
That did the trick for me (iPad 2 and 3; 3 with iOS 5.1.1)
var host=window.opener;
window.focus(); /* solves the iPad3 problem */
window.close(); /* the actual closing we want to achieve... */
/* makes the focus go back to opener on iPad2, fails silently on iPad3 */
try { host.focus(); } catch(e) {}
I had the same issue as well. My initial code would focus on the parent window and then close the current one. This always ends up closing the wrong window. What I did was to remove the .focus
call and added a small delay to the window.close() and it worked for me. Original source for the delay suggestion - https://twitter.com/#!/gryzzly/statuses/177061204114685952
Set focus on the window before closing it