web-components
web-components copied to clipboard
[a11y-base] Move long touch gesture from context-menu to the base package
Describe your motivation
Because of historical reasons, vaadin-context-menu registers a Polymer gesture handler to deal with iOS:
https://github.com/vaadin/web-components/blob/bc227bd848d1ff35a4d719ee64740587c91bd0ce/packages/context-menu/src/vaadin-contextmenu-event.js#L60-L73
We might want to re-use this logic with other components e.g. vaadin-tooltip on mobile or something else.
Describe the solution you'd like
- Move
vaadin-contextmenu-event.jsfile to@vaadin/a11y-basepackage, - Try to improve test coverage, even though we don't test on iOS Simulator,
- Check out React Aria's
useLongPresshook implementation for more ideas.