5

I'm developping a webapp (javascript) to put on the homescreen of the iPad to be able to run it in fullscreen mode. Everything is working but after a random while, the home button doesn't work anymore. But the app still continuing to run, and the is no bug at all. I still can run javascript functions in the console with safari on my mac, alert, prompt, and all of those stuff are working. but not window.close(); To quit the application I have to restart my device by pushing the switch off button and the home button.

If anyone can help me to figure out what it is I would be very happy.

Teddy K
  • 100
  • 7
  • I am having the same issue on a small webapp I wrote that has only one button and uses Jquery Mobile. I belive this is a bug in iOS 6.1 that makes the iOS enter in kiosk mode. – Jaime P Jul 21 '13 at 19:09
  • I have the same problem. iOS 7.0, fullscreen web app, web cache enabled. Sometimes home button stops working and I can't go back :/ – Marcin Ignac Sep 29 '13 at 22:11

2 Answers2

2

The SoundJS team has tracked this issue down to the web app entering full screen mode using:

<meta name="apple-mobile-web-app-capable" content="yes" />

A bug was reported to apple (reference #15133492).

Currently we have no work around except not entering full screen mode.

OJay
  • 1,249
  • 7
  • 14
0

I had the same problem and after some debugging I discovered it came from alert, confirm or prompt native box.

After displaying one of those native box in a particular situation (not every ones are true), hardware home and lock buttons won't work anymore.

In my situation, confirm() box was called inside an onclick event with setTimeout like this:

var btnCallback = function() { setTimeout(function() { callback(/*var answer = confirm('');...*/); }, 1); }

You should remove calls to these kind of dialog windows and prefer using homemade ones.

Tested on iPhone 4 with iOS 6.1.3.

Hope it helps.

EDIT

It could also come from blocking javascript portion of code (like confirm behavior when showed or large amount of code processing).

This is only supposition.

EDIT 2

After other tests, the problem seems to still be there. All I do is using google maps API v3 and displaying div from current URL hash.

No page reload, just javascript and window location hash manipulation.

I don't understand where does it come from.

rémi
  • 1
  • 1
  • thank you for you response, but any of those cases is corresponding my issue. I have what I meant that i cam run command in the debugger but i can't close the windows with javaScript to go back in the homescreen. – Teddy K Jul 31 '13 at 12:13
  • I'm seeing the same issue in apps and had thought it was related to web audio. Question for you Remi, was there any web audio in your app? And to confirm, your home button would stop working? – OJay Sep 30 '13 at 21:10