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
javascript jquery ios mobile-safari


source to share


No one has answered this question yet

Check out similar questions:

7728
How do I redirect to another web page?
7649
How does JavaScript blocking work?
7494
How can I remove a specific element from an array in JavaScript?
7432
How to check if a string contains a substring in JavaScript?
7428
How can I check if an element is hidden in jQuery?
5722
How can I remove a property from a JavaScript object?
4829
How do I include a JavaScript file in another JavaScript file?
4345
How to check if a checkbox is checked in jQuery?
1001
Is Safari iOS 6 caching $ .ajax results?
802
Is it a recommendation to include CSS before JavaScript is invalidated?



All Articles
Loading...
X
Show
Funny
Dev
Pics