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

cannot swipe: delayed touch start on mobile and unwanted autoscrolling of page during touch move #1795

Open
repenning opened this issue Mar 24, 2020 · 1 comment

Comments

@repenning
Copy link

Expected behavior

Touch based drag and drop should be snappy on mobile devices (e.g., iOS 12). Users should be able to swipe, i.e., to touch component and move instantly without waiting for some selection feedback.

Examples of dnd-list show how UX should be (dnd-list from baseweb)

This applies to all examples I have tried: they work well on my Mac with mouse events but are close to unusable on mobile devices such as iPhone with iOS 12 with touch events. The same is not true for dnd-list by baseweb (However, I prefer the design and flexibility of rbd).

Actual behavior

UX: touch appears to take long time to register (feels like 0.5 sec or greater). Dragging, i.e., touchmove, also triggers unwanted web page scrolling. Super annoying.

Steps to reproduce

Run any example of rbd on iPhones and compare to similar example of dnd-list

sandbox

Suggested solution?

  • looks like there is some timer between touchstart and triggering of the drag event. Remove this delay or make this configurable.
  • prevent accidental scrolling. Dnd-list does something like this:
canvas.addEventListener("touchmove", e => {
    e.preventDefault();
    e.stopImmediatePropagation();
  },
  {passive: false});

What version of React are you using?

16.5.2

What version of react-beautiful-dnd are you running?

9.0.2

What browser are you using?

mobile safari iOS 12

Demo

sandbox

@trevyn
Copy link

trevyn commented Aug 30, 2020

Dupe of #415?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants