- From: Brenton Simpson via GitHub <sysbot+gh@w3.org>
- Date: Thu, 11 May 2017 23:10:20 +0000
- To: public-pointer-events@w3.org
Hmmm… I was afraid `downEvent.preventDefault()` would suppress `pointermove`, but it doesn't seem to. Still, when `pointerdown` fires, I don't know enough about the user intent yet to know if I should cancel. By the time I do, [it's too late](https://codepen.io/appsforartists/pen/zwWMKe0). Calling `downEvent.preventDefault()` after I have measured that the cursor has moved far enough to know I should be dragging doesn't stop `click` or `scroll` from firing. What if there is a clickable element, like a `<button>`, in the draggable container? I would want the user to be able to click on it if they don't move their cursor but to drag the container if they do. Similarly, imagine a carousel that pans left/right. If the user drags left/right, my JS event listener ought to drag the carousel to show the next image. If the user drags up/down, the page ought to scroll (the browser default). In `pointerdown`, I don't have enough information to know if I should prevent the default behavior. -- GitHub Notification of comment by appsforartists Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/205#issuecomment-300940957 using your GitHub account
Received on Thursday, 11 May 2017 23:10:28 UTC