Skip navigation

Safari JavaScript Issues on iPad on with iOS6

6054 Views 7 Replies Latest reply: Jan 29, 2013 10:47 AM by sparkyipad RSS
sparkyipad Calculating status...
Currently Being Moderated
Sep 25, 2012 8:17 AM

I have an older HTML application that I am supporting, and admittedly, some of the JavaScript techniques are old, but I don't have the time to re-write the application at this time, it is 100,000's of lines of code.


A little background:

  • the code has been unchanged in several years
  • the code works on OSX (10.8.2) in Safari
  • the code works in Win 7 in Safari (5.1.7)


Unfortunately, several of my users have upgraded to iOS6 on the iPad and the code does not work in either Safari or Chrome.


The application will pop-up a window/tab based on the onChange event of a select element or from the onClick of a button.


The onClick from the button does not trigger the Safari "Allow Pop-up", but the onChange event does.


Once the pop-up window/tab has been opened (via one of the two methods above), the user makes a selection on screen and clicks a button which (ultimately) triggers a window.opener function.


I can not ever get the window.opener function to trigger when the pop-up window was triggered from the onChange (select element).


The window.opener will usually (maybe always, but I seem to remember it didn't once or twice) trigger if the pop-up window remains open, but the user manually puts focus on the "opener" window.


Again this works (and has worked) for many years on many different browser, unfortunatey, most of my users are now on iPads.


Any thoughts or tips would be greatly appreciated.


BTW first post, so please be kind.

iPad, iOS 6
  • etresoft Level 7 Level 7 (23,905 points)
    Currently Being Moderated
    Sep 25, 2012 5:36 PM (in response to sparkyipad)

    With 100,000 lines of code in a web app, I don't think many people are going to be too interested. The best anyone could do is give general suggestions.


    It sounds like you are opening a new window and then expecting something to happen on the opener in a timer. Because Safari on iOS only loads the current page, that timer isn't going to execute. Pop-ups are really a pain. If you were using CSS, you wouldn't have this problem.

  • stijn_d Calculating status...
    Currently Being Moderated
    Oct 10, 2012 12:57 AM (in response to sparkyipad)

    Hey Sparkyipad, I had a problem just like yours. After using a touch-event the setTimeout wouldn't be triggerd. It did however trigger after a click-event. I've been googleing about this issues for about a day now and found a solution.


    Aparently there's been some talk about a bug in the timer-functions in the new mobile safari when it was updated to IOS6 and this solution seems to work for me:


    In case you are wondering, this is were if found my answer: 40015


    Hope this helps


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.