Closed Bug 1930275 Opened 4 months ago Closed 4 months ago

list dataTransfer.files only show a single element when multiple files are dropped

Categories

(Core :: DOM: Events, defect)

Firefox 132
defect

Tracking

()

RESOLVED DUPLICATE of bug 1908196

People

(Reporter: janusheide, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0

Steps to reproduce:

If dropping multiple files in either of these two examples:
https://jsbin.com/hiqasek/edit?html,js,output
https://jsfiddle.net/9C2EF/

From the documentation here:
https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/files

user agent string:
Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0

Actual results:

event.dataTransfer.files only contain a single element

Expected results:

event.dataTransfer.files should have contained multiple elements

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Events' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Events
Product: Firefox → Core

Thanks for the report!

I tried this, got the result:

File Count: 2
 File 0:
(object) : <[object File] > apa.cpp 416
 File 1:
(object) : <[object File] > perf.txt 2301

Is there something special I need to do to set this up? Tried on Fedora and macOS.

Flags: needinfo?(janusheide)

Dragging three files in I get this:

File Count: 1
 File 0:
(object) : <[object File] > README.rst 3075

So here only the first one shows up. If I try with Chrome on the same machine i correctly get.

File Count: 3
 File 0:
(object) : <[object File] > README.rst 3075
 File 1:
(object) : <[object File] > pyproject.toml 2153
 File 2:
(object) : <[object File] > NEWS.rst 109

I work on a project (https://www.countexact.com) where I have similar functionality so I am confident that this used to work correctly in Firefox on my machine. I am running Debian so could be something that only shows up there (maybe also Ubuntu)?

Is there any additional system information that I can provide that could be helpful here? Or any other thing that I could try to narrow down the reason for this?

Flags: needinfo?(janusheide)

Given that you say that this used to work before it would be extremely helpful if you could find out where it started breaking. We have a tool for that: https://mozilla.github.io/mozregression/ with installation instructions that should be straightforward for you to follow since you're on Debian (I'd recommend the pip package and running it from command line).

You can run it like this:
mozregression --launch 2024-01-01
to find a rough date where it used to work, and then use:
mozregression --good 2024-01-01
to run a bisection to find the regression range. It's fairly quick to do this, and it would help a lot!

Flags: needinfo?(janusheide)

Sure below are the last few steps. The commit the last link points to does indeed include some drag and drop related stuff :)

 8:51.85 INFO: Using local file: /tmp/tmpwqc3rr9s/a1cad969287d--autoland--target.tar.bz2 (downloaded in background)
 8:51.85 INFO: Running autoland build built on 2024-05-16 17:37:47.774000, revision a1cad969
 9:00.60 INFO: Launching /tmp/tmpu3wk2tm0/firefox/firefox
 9:00.60 INFO: Application command: /tmp/tmpu3wk2tm0/firefox/firefox -profile /tmp/tmpq81i_ptd.mozrunner
 9:00.61 INFO: application_buildid: 20240514120741
 9:00.61 INFO: application_changeset: a1cad969287d48204155b1f63911bd66909bee64
 9:00.61 INFO: application_name: Firefox
 9:00.61 INFO: application_repository: https://hg.mozilla.org/integration/autoland
 9:00.61 INFO: application_version: 128.0a1
Was this integration build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry', 'back' or 'exit' and press Enter): bad
 9:10.31 INFO: Narrowed integration regression window from [55ca51cd, 61e85518] (9 builds) to [55ca51cd, a1cad969] (5 builds) (~2 steps left)
 9:10.31 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=55ca51cd0059f200883599fb2bb9531709b37e51&tochange=a1cad969287d48204155b1f63911bd66909bee64

 9:10.31 INFO: Using local file: /tmp/tmpwqc3rr9s/936287e7cba7--autoland--target.tar.bz2 (downloaded in background)
 9:10.31 INFO: Running autoland build built on 2024-05-16 17:50:36.097000, revision 936287e7
 9:19.11 INFO: Launching /tmp/tmpuzwokay8/firefox/firefox
 9:19.11 INFO: Application command: /tmp/tmpuzwokay8/firefox/firefox -profile /tmp/tmpwxgp1nha.mozrunner
 9:19.12 INFO: application_buildid: 20240514120459
 9:19.12 INFO: application_changeset: 936287e7cba7e0a07179c59e7c9c74adaefdb47c
 9:19.12 INFO: application_name: Firefox
 9:19.12 INFO: application_repository: https://hg.mozilla.org/integration/autoland
 9:19.12 INFO: application_version: 128.0a1
Was this integration build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry', 'back' or 'exit' and press Enter): good
 9:29.11 INFO: Narrowed integration regression window from [55ca51cd, a1cad969] (5 builds) to [936287e7, a1cad969] (3 builds) (~1 steps left)
 9:29.11 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=936287e7cba7e0a07179c59e7c9c74adaefdb47c&tochange=a1cad969287d48204155b1f63911bd66909bee64

 9:29.11 INFO: Using local file: /tmp/tmpwqc3rr9s/68955533eb96--autoland--target.tar.bz2 (downloaded in background)
 9:29.11 INFO: Running autoland build built on 2024-05-16 17:28:10.055000, revision 68955533
 9:37.66 INFO: Launching /tmp/tmpln2boudx/firefox/firefox
 9:37.66 INFO: Application command: /tmp/tmpln2boudx/firefox/firefox -profile /tmp/tmptrkxlw40.mozrunner
 9:37.67 INFO: application_buildid: 20240514120641
 9:37.67 INFO: application_changeset: 68955533eb96b6d019d77be1ec753b353827d5d0
 9:37.67 INFO: application_name: Firefox
 9:37.67 INFO: application_repository: https://hg.mozilla.org/integration/autoland
 9:37.67 INFO: application_version: 128.0a1
Was this integration build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry', 'back' or 'exit' and press Enter): bad
 9:47.21 INFO: Narrowed integration regression window from [936287e7, a1cad969] (3 builds) to [936287e7, 68955533] (2 builds) (~1 steps left)
 9:47.21 INFO: No more integration revisions, bisection finished.
 9:47.21 INFO: Last good revision: 936287e7cba7e0a07179c59e7c9c74adaefdb47c
 9:47.21 INFO: First bad revision: 68955533eb96b6d019d77be1ec753b353827d5d0
 9:47.21 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=936287e7cba7e0a07179c59e7c9c74adaefdb47c&tochange=68955533eb96b6d019d77be1ec753b353827d5d0
Flags: needinfo?(janusheide)
Status: UNCONFIRMED → RESOLVED
Closed: 4 months ago
Duplicate of bug: 1908196
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.