Closed devon66h closed 1 year ago
Hi, good catch!
Indeed, as touch events are attached in a different manner that the desktop ones, the allowDrag
logic was not probably added for touch devices 🙈
The fix should be fairly easy: this whole block inside the useDrag()
hook should be ignored if allowDrag
is false
https://github.com/ValentinH/react-easy-sort/blob/main/src/hooks.ts#L211-L223
Would you like to submit a PR for this?
Hi, good catch!
Indeed, as touch events are attached in a different manner that the desktop ones, the
allowDrag
logic was not probably added for touch devices 🙈The fix should be fairly easy: this whole block inside the
useDrag()
hook should be ignored ifallowDrag
is false https://github.com/ValentinH/react-easy-sort/blob/main/src/hooks.ts#L211-L223Would you like to submit a PR for this?
@ValentinH Here ya go 😄 https://github.com/ValentinH/react-easy-sort/pull/32
Describe the bug Setting the prop
allowDrag={false}
works on desktop, but not on mobile devices.This bug has been observed across both iOS and Android, and across Chrome, Safari & Firefox.
To Reproduce Steps to reproduce the behavior:
allowDrag={false}
Expected behavior Expect dragging to be disabled on mobile devices