Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double tapping doesn't work on some iOS devices #2097

Closed
yaustar opened this issue May 24, 2020 · 1 comment
Closed

Double tapping doesn't work on some iOS devices #2097

yaustar opened this issue May 24, 2020 · 1 comment
Labels
area: input Input related issue bug

Comments

@yaustar
Copy link
Contributor

yaustar commented May 24, 2020

See thread here: https://forum.playcanvas.com/t/double-tap-issue-ios/13245

On this project with some iOS devcies, this doesn't work unless the user triple taps: https://forum.playcanvas.com/t/double-tap-issue-ios/13245

I haven't been able to reproduce this on a borrow iOS device yet but it seems to be related to model and iOS version.

I think it's related to a non-standard browser feature on Safari where the user can double tap too zoom. If I use preventDefault() on the original browser touch event as done here: https://playcanv.as/p/DzCHGrZP/ it works fine (PR to expose it to the public API: #2096)

We could also fix this potentially with the CSS property touch-action set to to manipulation (see https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action and https://stackoverflow.com/questions/59732074/disable-double-tap-zoom-on-safari-ios-13)

I would like to test this but don't have a device that shows this issue.

This could be pretty important as it means for some games (those that require timing and rapid tapping), some inputs from the user could consumed or delayed by the browser.

@yaustar yaustar added area: input Input related issue bug labels May 24, 2020
@yaustar
Copy link
Contributor Author

yaustar commented Jun 13, 2020

PR merged to expose original touch event and preventDefault fixes the issue.

@yaustar yaustar closed this as completed Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: input Input related issue bug
Projects
None yet
Development

No branches or pull requests

1 participant