- From: Bo Cupp via GitHub <sysbot+gh@w3.org>
- Date: Wed, 12 Jun 2019 02:20:20 +0000
- To: public-pointer-events@w3.org
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](https://social.msdn.microsoft.com/Forums/en-US/d50efbfd-fb96-47d8-86e3-98c0c65409c0/create-event-for-quotmouse-clickquot-and-quottouch-clickquot-separately?forum=winappswithhtml5) 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](https://www.html5rocks.com/en/mobile/touchandmouse/) 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 https://github.com/w3c/pointerevents/issues/100#issuecomment-501094715 using your GitHub account
Received on Wednesday, 12 June 2019 02:20:22 UTC