Closed churichard closed 2 years ago
Hello, @clauderic any news about this? I'm also experiencing this on Android. I would like to know if there has been any progress or how I can contribute. I'm using MouseSensor and TouchSensor, I have an onDragStart,onDragOver,onDragEnd and onDragCancel in my DnDContext.
I recently discovered that this happen on my Android device. Android V10, but I tested on another phone with Android V11 and this doesn't happen. I tested it on Google Chrome Latest version, Opera GX, and the native browser, all of them giving me the same result, blocking after 5 seconds of long-pressing
I'm using
MouseSensor
andTouchSensor
and dragging and dropping seems to work fine in Dev Tools, However, I just tried it out on my Android device today and noticed that the dragging and dropping is inconsistent.This is what I have set up:
I noticed that if I hold it for a short period of time and then start dragging, then the dragging works fine. However, if I hold it for a long time, then I feel my device vibrate and it gets stuck in place, like so:
https://user-images.githubusercontent.com/4218237/134080655-b48a1ef1-6f31-4340-ba9d-fb87dfa0c3af.mp4
And in Sentry, I get a
TypeError: Cannot destructure property 'onCancel' of 'this.props' as it is undefined.
, which I think points to here: https://github.com/clauderic/dnd-kit/blob/1fe9b5c9d34237aae6ab22d54478c419d44a079a/packages/core/src/sensors/pointer/AbstractPointerSensor.ts#L217-L222I don't have an
onDragCancel
handler set up on myDndContext
-- justonDragStart
andonDragEnd
.Perhaps
dnd-kit
is interacting weirdly with the native Android long press?Originally posted by @churichard in https://github.com/clauderic/dnd-kit/issues/453#issuecomment-923352923