react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Drag-and-drop broken on Chrome for Android

Open staticshock opened this issue 1 year ago โ€ข 7 comments

Provide a general summary of the issue here

It seems to me that drag and drop is generally broken on Chrome for Android, possibly due to recent changes to browser behavior?

  • I tried putting together an example that should work and could not get it to work (link below).
  • I also tested older versions of my repo, back when drag and drop was tested and definitely worked, and those don't work either (as tested via Chrome 129 for Android).

In my code, and also in the code sandbox shared below, a long press (on Chrome for Android) triggers isDragging on the correct item, but the DragPreview never renders, and no drags can be completed.

Is RAC's DnD implementation no longer working in the latest version of mobile Chrome, or am I missing something obvious? Is my example code broken? If so, how?

๐Ÿค” Expected Behavior?

DnD example works in Chrome for Android as it does on Safari for iOS

๐Ÿ˜ฏ Current Behavior

DnD example does not work in Chrome for Android.

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

https://codesandbox.io/p/sandbox/hungry-kepler-6frk9l

Version

RAC 1.3.2

What browsers are you seeing the problem on?

Other

If other, please specify.

Specifically Chrome for Android (and possibly iOS)

What operating system are you using?

Android

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

staticshock avatar Oct 08 '24 04:10 staticshock

What version of Chrome 129 are you on and what kind of Android device? Your code sandbox works for me, I see the drag preview and can reorder properly on my Android phone. I'm using Chrome 129.0.6668.81, Android 14, Galaxy S22+

LFDanLu avatar Oct 08 '24 22:10 LFDanLu

I'm on Chrome 129.0.6668.81 as well. Android 14, Pixel 6.

staticshock avatar Oct 08 '24 22:10 staticshock

https://github.com/user-attachments/assets/c11b80bd-b5f7-4ec4-8ca8-5fe51c05584e

Here's a screen recording of what I'm seeing. Sorry, the pointer is not part of the video.

staticshock avatar Oct 08 '24 22:10 staticshock

Super bizarre, here is a recording from my phone for reference:

https://github.com/user-attachments/assets/b07bddb1-eaf4-48de-9786-7b7141fa560e

I did just find this bug filed against Chromium: https://issues.chromium.org/issues/363930156, does their minimal reproduction example work for you?

LFDanLu avatar Oct 08 '24 23:10 LFDanLu

Oh, great find. Yeah, I think this is exactly what I'm running into. I can reproduce it reliably on my device using their demo.

staticshock avatar Oct 08 '24 23:10 staticshock

Great, thanks for letting us know about this! We'll have to see if a workaround is possible, but we might have to wait on Chrome for this one unfortunately. I'll leave this open for visibility though

LFDanLu avatar Oct 08 '24 23:10 LFDanLu

Happy to workshop or test solutions if you decide to fix this within React Aria

staticshock avatar Oct 09 '24 00:10 staticshock

Looks like the chrome bug is fixed, can someone with an android retest this?

snowystinger avatar Jun 11 '25 20:06 snowystinger

Confirmed!

staticshock avatar Jun 11 '25 22:06 staticshock

Thank you, closing

snowystinger avatar Jun 11 '25 22:06 snowystinger