Re: [pointerevents] Should "click", "dblclick" and "contextmenu" events be PointerEvents? (#100)

The open question on this thread seems to be about what use cases would require click, dblclick, and contextmenu to become a PointerEvent instead of a MouseEvent.

The use cases I know of involve detecting pointerType, but I don't think its fair to say that any of these cases actually "require" these events to be PointerEvents.  A developer could remember the pointerType of the last primary pointerup and use that during the click event handler to differentiate behavior.  So AFAICT the value of any change seems to be simplicity, i.e. developers can write less code to get differentiated behavior based on pointerType.

Two use cases to consider:
Video elements commonly show controls on the first touch so that the user can then tap the pause button, adjust volume, drag the scrubber, etc.  Any move of the mouse can reveal the same controls so the click anywhere on the video can just directly toggle play/pause.

The select element of edgehtml-based Edge has touch-specific spacing for its select popup, i.e. opening the UI with your finger on a touchscreen device versus the mouse on the same device will lead to options that are spaced further apart for touch. While this UI is triggered on pointerdown I don't think its a stretch to say that any UI triggered on click or contextmenu could benefit from similar treatment.

Some (old) evidence I found that devs want this behavior: [MSDN question](

AFAICT YouTube has the differentiated behavior I describe for touch versus mouse when it comes to toggling play/pause for a video.

Lastly, this (also old) [article]( talks about the same pattern of turning UI that requires hover and then click into a two-touch UI:
> Make the UI take two single touch events to complete the click - the first click will show the hover information, the second will complete the action.

GitHub Notification of comment by BoCupp-Microsoft
Please view or discuss this issue at using your GitHub account

Received on Wednesday, 12 June 2019 02:20:22 UTC