All other projects now also no longer work correctly. I just don’t know if this is due to my update from iOS 13.3.1 to iOS 13.5 or if a change has been made in PlayCanvas.
In your native event code example, you have used event.preventDefault(). This example does the same thing if you don’t mind testing. https://playcanv.as/p/DzCHGrZP/
If you removed the lines that call preventDefault in your native code example, chances are you will have the same problem of double tapping not working.
Okay, but first all test projects worked fine for me (without preventDefault), so it may be related to the iOS version as I updated it from 13.3.1 to 13.5.0 yesterday.
This bug was introduced in iOS 13.5 (and iOS 13.5.1 still has it). Even touchstart's event handler doesn’t get called the second time when a double tap occurs. The default double tap zoom is triggered though (which seemingly cannot be suppressed).
I could reproduce this issue in these browsers:
Safari (13.5, 13.5.1)
Chrome (83.0.4103.88)
Firefox (26.0)
Opera touch (2.3.2)
Interestingly, however, I cannot reproduce any double tap issues with Microsoft’s Edge (for iOS, 45.4.11). Not sure why, since Apple requires all browsers to use WebKit on iOS.
FYI: emscripten’s touch events suffer from the same issue, as well as many gesture detection JS libraries.
Sorry, forgot to mention… yes, your fix works on iOS 13.5.1 in all the browsers I listed above. I can’t make use of it though, because I don’t use PlayCanvas or JS at all. I just popped in because I saw you guys talking about this issue.
Ah, I see. Yeah, that’s frustrating since you are using emscripten too. Is there a layer between the emscripten output and the web app that hooks up the two?