Skip to content
This repository was archived by the owner on Apr 10, 2022. It is now read-only.
This repository was archived by the owner on Apr 10, 2022. It is now read-only.

Need a way to determine right or left click #12

@deviationist

Description

@deviationist

I'm working on a PWA that is used both on touch devices and computers. When right clicking a event that has a longpress-event binded to it, then "long-press-start" is triggered, but "long-press-stop" is never trigered, not until one click with the left button and the regular event cycle kicks in.

I solved this manually by listening for "window.oncontextmenu" to detect if the click is right or left, and the discard the long press event if the right button was used.

Would this be something that the longpress should detect, whether the right or left mouse button is clicked?

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions