-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershas pr
Description
Clear and concise description of the problem
Difficulty in setting a delay value for different pointers.
Suggested solution
export interface OnLongPressOptions {
// ...
delay?: number | (event: PointerEvent) => number;
// ...
}
const onLongPressOptions = {
// ...
delay: (event: PointerEvent) => event.pointerType === 'mouse' ? 0 : 500;
// ...
};
Alternative
No response
Additional context
I know there's a way to determine if it was a long press in the onMouseUp event, but there are things we want to execute on pointerdown. For example, I'm working on a drag and drop feature, so on pointerdown, I want to activate drag immediately on desktop, but on mobile, I want to activate it by holding down the touch for 500ms.
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
OrbisK
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershas pr