clauderic / react-sortable-hoc

A set of higher-order components to turn any list into an animated, accessible and touch-friendly sortable list✌️
https://clauderic.github.io/react-sortable-hoc/
MIT License
10.79k stars 977 forks source link

In iOS 13.1 or later, when combined with react-virtualized, the SortableElement dragged outside the SortableContainer may not be operated #646

Open boundare-osada opened 4 years ago

boundare-osada commented 4 years ago

In iOS 13.1 or later, when combined with react-virtualized, the SortableElement dragged outside the SortableContainer may not be operated.

This bug occurs when the original component of the dragged SortableElement is scrolled out of the SortableContainer and disappears.

The cause is that the disappeared component will not fire the touch event.

This bug can be confirmed by accessing and operating the sample page on an iPad with iOS 13.1 or later installed.

https://clauderic.github.io/react-sortable-hoc/#/react-virtualized/basic-usage?_k=p9q4nq

boundare-osada commented 4 years ago

I tried to avoid it by explicitly issuing a mouse event when receiving a touch event, but it didn't work because I could not inherit the pageX / pageY property of the event object.

https://github.com/clauderic/react-sortable-hoc/blob/1c69772bd4df0d40828531288faad95888be4b5a/src/utils.js#L143-L146