How to fix iOS 7-8 safari preventing touchmove error?

I found a strange bug in the iOS 7-8 Safari browser.

I have set preventDefault()

for touchmove event for all elements on the page. It looks good at first, but in Safari, at the bottom of the window, where the navigation bar appears when that bar is hidden, if I try to scroll the page at that location, the page will scroll ignoring the preventDefault

touchmove event.

How can I fix this?

Here's a demo. I set a delay of 3 seconds for preventDefault()

because you need to scroll the page a bit for the navigation bar to become hidden.

sanex3339.github.io/safariWTFISGOINGONo

+3


source to share





All Articles