Closed Bug 1908196 Opened 8 months ago Closed 3 months ago

[X11/KDE] Drag and drop of multiple files, only one file show up

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 128
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
thunderbird_esr115 --- unaffected
thunderbird_esr128 --- fixed
firefox-esr115 --- unaffected
firefox-esr128 --- fixed
firefox128 --- wontfix
firefox129 --- wontfix
firefox130 --- wontfix
firefox131 --- wontfix
firefox133 --- wontfix
firefox134 --- wontfix
firefox135 --- fixed

People

(Reporter: moninsergei, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(5 files)

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

Steps to reproduce:

Until the last time, the drag and drop functionality worked just fine. The bug started to appear in firefox 128 (I think?), when I open dolphin file explorer (kubuntu 22.04, KDE plasma) and drag multiple files into drag and drop area, only one file appears. Try for yourself --> https://jsfiddle.net/9C2EF/ Select multiple files and drag into area. I tried in: firefox 128, firefox 130, also in private mode. Bug still appears. I tested in google chrome, everything works just fine.

Actual results:

Only one file appears in event.dataTransfer.files (I dragged 5 files)

Expected results:

Should be an array of files

Hmm, I tested in GNOME file explorer, everything works just fine. It looks like that the bug only appears in KDE/Dolphin 🙄

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

Component: Untriaged → DOM: Copy & Paste and Drag & Drop
Product: Firefox → Core

I can reproduce the issue on Nightly130.a1, Firefox128.0 kubuntu22.04 KDE plasma 5.24.7.
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=936287e7cba7e0a07179c59e7c9c74adaefdb47c&tochange=68955533eb96b6d019d77be1ec753b353827d5d0

(If I use Nemo or pcmanfm instead of Dolphin file manager, the the drag drop works as expected.)

Status: UNCONFIRMED → NEW
Component: DOM: Copy & Paste and Drag & Drop → Widget: Gtk
Ever confirmed: true
OS: Unspecified → Linux
Regressed by: 1881229
Hardware: Unspecified → Desktop
Version: Firefox 130 → Firefox 128

:stransky, since you are the author of the regressor, bug 1881229, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(stransky)

Sounds like newer versions of Dolphin may have fixed this already. Do we have any contacts for getting this backported into 22.04 like the upstream bug suggests?

Flags: needinfo?(emilio)

I think Alexandre is more involved with Canonical and he would know?

Flags: needinfo?(emilio) → needinfo?(lissyx+mozillians)

I don't think canonical manages kubuntu ?

Flags: needinfo?(lissyx+mozillians) → needinfo?(bandali)

Set release status flags based on info from the regressing bug 1881229

Blocks: linuxdad
Priority: -- → P3

This happens to me also, using Arch Linux, firefox version 129.0-1 and Dolphin 24.05.2
so I don't think it's been fixed yet.

See Also: → 1914625
Duplicate of this bug: 1914941
See Also: → 1921260
Duplicate of this bug: 1921260

We now have reports on other distros (ArchLinux, Debian)

Also I manually test FF nightly builds from https://ftp.mozilla.org/pub/firefox/nightly/2024/05/ and found point of bug first appears:

  • firefox-128.0a1.en-US.linux-x86_64-2024-05-14-09-50-49 (dropped all items)
  • firefox-128.0a1.en-US.linux-x86_64-2024-05-15-03-23-56 (dropped only first item)
  • firefox-128.0a1.en-US.linux-x86_64-2024-05-17-21-53-59 (not dropped at all)
  • firefox-128.0a1.en-US.linux-x86_64-2024-05-21-09-45-53 (not dropped at all)
  • firefox-128.0a1.en-US.linux-x86_64-2024-05-31-21-30-29 (dropped only first item)

(In reply to aakumykov from comment #15)
Test case is https://dragdrop.com/test

Mozregression from good point 2024-05-01 result (full log is attached also):

6:11.62 INFO: Narrowed integration regression window from [936287e7, a1cad969] (3 builds) to [936287e7, 68955533] (2 builds) (~1 steps left)
6:11.62 INFO: No more integration revisions, bisection finished.
6:11.62 INFO: Last good revision: 936287e7cba7e0a07179c59e7c9c74adaefdb47c
6:11.62 INFO: First bad revision: 68955533eb96b6d019d77be1ec753b353827d5d0
6:11.62 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=936287e7cba7e0a07179c59e7c9c74adaefdb47c&tochange=68955533eb96b6d019d77be1ec753b353827d5d0

That's the same regressor which was already identified in this bug

Hello,
I confirm this.
Kubuntu Desktop running KDE with Dolphin and Firefox. Installed Thunar for test purposes.
Dragging multiple files into Firefox browser window from Thunar marks all files for upload.
Dragging multiple files into Firefox browser window from Dolphin only marks one file for upload.
I need this to work properly as I am using drag and drop almost daily...

Duplicate of this bug: 1929553
Duplicate of this bug: 1930275
Duplicate of this bug: 1930733
Duplicate of this bug: 1925762

I do see that now. It's a bug in processing text/x-moz-url MIME type, we rear only first item from the list.

The problem here is that Dolphin sends us only one file as text/x-moz-url but posts complete list as text/plain.
It's interesting that it affects X11 Plasma session only - if I run Dolphin under GNOME/XWayland it works.
Only issue is with X11/Plasma.

Regression from Bug 1881229 causes that we don't try to get URI list from text/plain any more. That was a hack and I don't want to introduce it again. Let's see if we can use text/uri-list as first choice. I see dolphin supports:

[Parent 48324: Main Thread]: D/WidgetDrag [D 1][7f0aa0065100]   adding drag context available flavor text/uri-list
[Parent 48324: Main Thread]: D/WidgetDrag [D 1][7f0aa0065100]   adding drag context available flavor text/x-moz-url
[Parent 48324: Main Thread]: D/WidgetDrag [D 1][7f0aa0065100]   adding drag context available flavor text/plain
[Parent 48324: Main Thread]: D/WidgetDrag [D 1][7f0aa0065100]   adding drag context available flavor application/x-kde4-urilist
[Parent 48324: Main Thread]: D/WidgetDrag [D 1][7f0aa0065100]   adding drag context available flavor application/vnd.portal.filetransfer
[Parent 48324: Main Thread]: D/WidgetDrag [D 1][7f0aa0065100]   adding drag context available flavor application/x-kde-source-id

so let's see if we can use something from it.

Try to get text/uri-list first and then fallback to text/x-moz-url.
text/x-moz-url MIME tends to be poorly supported by third party apps,
we got only one file instead of file list or nothing at all.

Assignee: nobody → stransky
Status: NEW → ASSIGNED
Flags: needinfo?(stransky)
Summary: Drag and drop of multiple files, only one file show up → [X11/KDE] Drag and drop of multiple files, only one file show up

As a simple fix we may uplift it to beta.

Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/1a0df99b3a94 [Linux] Drag&Drop - try to get text/uri-list first and convert it to text/x-moz-url r=emilio
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Duplicate of this bug: 1932443
Duplicate of this bug: 1935668

Do we need this on ESR128? Please nominate if so - it grafts cleanly.

Flags: needinfo?(stransky)

I'd need to test that on ESR first, not sure if we need another patch for it.

Comment on attachment 9441772 [details]
Bug 1908196 [Linux] Drag&Drop - try to get text/uri-list first and convert it to text/x-moz-url r?emilio

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Fixed D&D file operation on multiple targets.
  • User impact if declined: D&D for more than one file may fail.
  • Fix Landed on Version: 135
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Updates order of MIME formats request, ask for wide supported format first.
Flags: needinfo?(stransky)
Attachment #9441772 - Flags: approval-mozilla-esr128?

Tested the patch on ESR128 and it works as expected.

Comment on attachment 9441772 [details]
Bug 1908196 [Linux] Drag&Drop - try to get text/uri-list first and convert it to text/x-moz-url r?emilio

Approved for 128.7esr.

Attachment #9441772 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
See Also: → 1916840
Flags: needinfo?(bandali)
See Also: → 1946150
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: