Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many other behaviors interrupt pointer events (dragstart, touch-action) #213

Closed
appsforartists opened this issue Jul 19, 2017 · 0 comments · Fixed by #293
Closed

Too many other behaviors interrupt pointer events (dragstart, touch-action) #213

appsforartists opened this issue Jul 19, 2017 · 0 comments · Fixed by #293
Assignees
Labels

Comments

@appsforartists
Copy link

This is a continuation of #205.

The developer ergonomics of building a gesture recognizer with pointer events now are painful, because there are too many things you need to know and remember to do it correctly. For instance:

  • If you forget to set touch-action: none, pointermove won't be dispatched from a touch screen.
  • If the user has a mouse/pen and starts a gesture on a link or image, dragstart will interrupt the pointer stream. To prevent this, the author must call downEvent.preventDefault(). This means the author needs to know and remember which behaviors are default for a down event and to be OK with preventing all of them.

Just these two already introduce a tremendous mental burden that make pointer events too hard to work with. Experienced developers may forget to do them, and newcomers probably don't even know about them. Without the luxury of both time and resources to be able to test a UI on all different types of pointers, an author might not even know there's a problem, but users will have a poor experience.

How can we make it easier for an author to opt-in to pointer events (and out of other behaviors like drag-and-drop)?

@appsforartists appsforartists changed the title Preventing HTML drag-and-drop from pointer streams Too many other behaviors interrupt pointer events (dragstart, touch-action) Jul 19, 2017
@NavidZ NavidZ added the v3 label Mar 14, 2018
@NavidZ NavidZ self-assigned this Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants