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

Cannot double-tap on iOS 13.4+ browsers #7694

Closed
quincylvania opened this issue Jun 10, 2020 · 1 comment
Closed

Cannot double-tap on iOS 13.4+ browsers #7694

quincylvania opened this issue Jun 10, 2020 · 1 comment
Assignees
Labels
bug-browser-specific A bug that only appears in certain browsers touch-stylus An issue with touchscreen or pen input
Milestone

Comments

@quincylvania
Copy link
Collaborator

This is a bizarre bug, one of several apparently introduced in iOS 13.4. I've seen it on mobile Safari, Firefox, and Chrome, so it must be a WebKit issue.

Basically it looks like pointerup/pointerdown events are throttled to about one second for any element with a gesture event listener, even if the event handler doesn't do anything. iD listens for gestures to enable pinch-to-zoom of the map via trackpads. As a result, any double-tap interaction is broken, namely double-tap-to-zoom and double-tap to add vertices to ways. This negates the fixes for #2128 and #2677.

Unless I'm missing something (which is quite possible), our options are these:

  • Don't listen for gesture events
  • Don't use pointer events for double-tap detection
  • Wait for a WebKit patch, if one is forthcoming
@quincylvania quincylvania added bug-browser-specific A bug that only appears in certain browsers touch-stylus An issue with touchscreen or pen input labels Jun 10, 2020
@quincylvania quincylvania self-assigned this Jun 15, 2020
@quincylvania quincylvania added this to the 2.18.0 milestone Jun 15, 2020
@quincylvania
Copy link
Collaborator Author

quincylvania commented Jun 15, 2020

I realized that we really only need to override gesture events on desktop Safari. Since this bug only affects mobile Safari, I added a check to see if iD is running in mobile webkit or not before adding the event listeners.

User agent sniffing like this is hacky and generally not recommended, but I think it's unavoidable when addressing this kind of browser-specific bug. It's not catastrophic if the detection fails in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-browser-specific A bug that only appears in certain browsers touch-stylus An issue with touchscreen or pen input
Projects
None yet
Development

No branches or pull requests

1 participant