-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
a11yAccessibility issueAccessibility issueenhancementNew feature or requestNew feature or requestrefactorInternal improvementInternal improvementvaadin-context-menu
Description
Describe your motivation
Because of historical reasons, vaadin-context-menu registers a Polymer gesture handler to deal with iOS:
web-components/packages/context-menu/src/vaadin-contextmenu-event.js
Lines 60 to 73 in bc227bd
| this._timerId = setTimeout(() => { | |
| const ct = e.changedTouches[0]; | |
| if (!e.shiftKey) { | |
| if (isIOS) { | |
| this._fired = true; | |
| this.fire(t, ct.clientX, ct.clientY); | |
| } | |
| // Needed to prevent any 'tap' gesture events from firing | |
| // which could potentially cancel/close the overlay. | |
| prevent('tap'); | |
| } | |
| }, 500); // Default setting for Android and iOS. | |
| }, |
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.
Metadata
Metadata
Assignees
Labels
a11yAccessibility issueAccessibility issueenhancementNew feature or requestNew feature or requestrefactorInternal improvementInternal improvementvaadin-context-menu