You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue is that preventDefault needs to be called on the touchstart event to prevent the default scrolling behaviour while dragging.
Second issue is around Chrome defaulting document level event listeners to being passive (https://www.chromestatus.com/features/5093566007214080). Passive handlers cannot call preventDefault() as to improve scrolling performance by allowing the browser to know that scrolling will not be interrupted. React happens to bind its event handlers at the document level and then delegates the events to the appropriate handlers instead of attaching them directly to the node the listener was defined on (strange).
Solution is to get a ref of the draggable element and attach a touchstart listener manually which calls preventDefault() (look to cleaning this up in the future when react comes up with a solution facebook/react#8968
lioneltay
changed the title
Not working in mobile, scrolling viewport instead
Drag not working on mobile, scrolls the viewport instead
Jan 10, 2019
Dragging doesn't work on mobile since that is the gesture for scrolling on mobile.
The text was updated successfully, but these errors were encountered: