[Bug]: HTML Drag and Drop API not returning event.dataTransfer.files array consistently on all Electron versions #41977
Labels
29-x-y
bug 🪲
component/drag-and-drop
has-repro-gist
Issue can be reproduced with code at https://gist.github.com/
platform/linux
Preflight Checklist
Electron Version
29.1.5
What operating system are you using?
Ubuntu
Operating System Version
Ubuntu 23.10
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
Consistently return the dropped files - event.dataTransfer.files array so that I can get the file.path property from it.
Actual Behavior
My original project is on Electron 3.1.11 and I'm developing on older Ubuntu 16.04 where I'm testing my code and it's working 100 out of 100 times. On another newer Mint 21.2 it's also working. It is my QA who found that on some new distributions, only some of the times, the drops return the array list populated with information.
Most of the times event.dataTransfer.files array is returned empty. It's like some race condition... only on some Linux distributions.
I thought that it maybe is related to the old Electron version but I created a blank project with the newest Electron version and it is the same behavior
Please check the screenshot where I'm printing in the console the event.dataTransfer.files[0].path property:
Here is also a video of the problem:
reproducing.drop.down.not.working.mp4
Testcase Gist URL
https://gist.github.com/Ob1To/8adae451dad15605443eda03061601fd
Additional Information
No response
The text was updated successfully, but these errors were encountered: