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.