3 ms·
I think you can work around it by listening on the touchstart event on your element and calling e.preventDefault(). Don't have an iPhone handy to test it right
by GranPC 2y ago
I think you can work around it by listening on the touchstart event on your element and calling e.preventDefault(). Don't have an iPhone handy to test it right now, but I believe that's how I fixed that issue in my web game.
- laszlokorte 2y agoThank you for the suggestion. This is also what is discussed in some stackoverflow threads on that topic. I simply do not get why javascript is required to stop the browser from interfering with user actions. Calling preventDefault also messes with element focus and other events.
- GranPC 2y agoYeah, I am not the biggest fan of iOS Safari because of things like these. In my case, disabling most default interactions was a desirable property because I wanted to handle all the UI myself - but I understand that may not always be a good solution.