Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ios 8 Homescreen webapp, turning iPad off and on stops javascript

I have a fullscreen HTML5 web app for iPads and have just installed IOS 8 to try it out and it all works perfectly until you power the iPad off and back on. As soon as the web app relaunches javascript just stops and loading new pages doesn't restart it.

When opening the same page in Safari on the iPad, turning the iPad off and on it carries on working as expected.

Anyone else noticed this or come up with a work around?

like image 269
Ridley Deckard Avatar asked Sep 12 '14 11:09

Ridley Deckard


2 Answers

I noticed this this problem too. At the moment there seems to be no work around. According to Sencha this is a problem natively.

"This bug is easily reproduced by simply calling setTimeout(callback, 1) or requestAnimationFrame(callback) via some button or event. When you first open your application, you’ll notice all timing functions are working fine. However if you lock your phone and then unlock to return to your application, you’ll see none of the timing functions can call callbacks anymore. They are simply broken at a native level. There is no reset, no bringing your application back to life, it’s a kill it and restart situation." http://www.sencha.com/blog/apple-shows-love-for-html5-with-ios-8

Your best bet is to report this bug to Apple and hopefully they’ll patch this in the next update (which should be coming around late September).

like image 116
Arnel David Mercado Avatar answered Nov 01 '22 16:11

Arnel David Mercado


This seems to me resolved in the iOS8.1.1 update.

like image 35
João Teixeira Avatar answered Nov 01 '22 16:11

João Teixeira