-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Switch from legacy mouse/touch events to newer pointer events #5505
Comments
All major browsers now support pointer events, covering 86% of global users according to caniuse. I imagine it's an even higher percentage of iD users. I think it's time to try making pointer events standard as we work towards better mobile support in v3. We can fallback to the old events for unsupporting browsers. |
Enable dragging nodes with touches and styluses (close #7415)
…orms (re: openstreetmap#5505) Fix issue where Apple Pencil stylus could not select map data (close openstreetmap#7396) Fix issue where features could not be selected in a single tap on iPad (close openstreetmap#7380)
) Enable dragging nodes with touches and styluses (close openstreetmap#7415)
) Properly disable dragging the map under the edit menu for pointer events (re: #5505)
We've made a lot of progress with this switch! Here are a few things you can now do on touch devices that were impossible or buggy before:
While there are still more opportunities to improve touch interactions, I'm considering the meat of this issue complete. Further work can be split into more specific issues. |
This is a followup from #5492
iD's support for touchscreens is not great. We have a lot of legacy code that is really built for mouse interaction, while everywhere people using touch devices.
Supporting touch devices has been tricky because of browser incompatibilities. iD builds on d3 (particularly d3-zoom ) for map interaction, and it works ok, but we need to add a lot of workarounds.
Pointer Events are the more modern and now better supported way of handling user input across different kinds of devices.
More info:
https://medium.com/@wesharehoodies/pointer-events-with-react-the-why-how-what-617a5b51dbb2
There's no rush to switch, but some things to consider:
wheel
events)wheel
event workaround)Originally posted by @bhousel in #5492 (comment)
The text was updated successfully, but these errors were encountered: