This is less of a code question and more of a library support question. (I know, I know... SO is for code debugging!)
I am using Hammer.js within a jQuery Mobile web app. I have written some gesture handling code that enables users to pinch-to-zoom and swipe-to-scroll just one <div>
in my project, while maintaining user-scalable=no
viewport. After days of writing and debugging, it's working for me. It works and I have tested in Safari and Chrome on iOS 7, and in Safari on iOS 6. It's working on iPad and iPhone.
That is, until I "Save to Home Screen". Once I do this, and I launch from the icon on my home screen, my swipe-to-scroll functionality is lost. Pinch-to-zoom is still working.
Any idea what might cause working code in Safari to break once launched from inside a "Home Screen" icon web app ?
See for yourself at http://omdapp.devstage.co/ (open in mobile browser, and then use "Add to Home Screen" and try when launched from home screen)
Things I've tried:
- Adding "?v=1" to the JS includes
- Changing JS filenames altogether
- Clearing Safari history/cookies/data
- Debug to make sure no JS errors thrown
- Remove and re-add the Home Screen icon
Note: I do not have Mac OS, so I cannot test using Web Inspector.
.removeAttr()