Bug 484018

Summary: KDE Plasma in Wayland does not support Drag and Drop operations from Dolphin to Chromium (and Firefox).
Product: [Applications] dolphin Reporter: Venca B Spam <vbspam>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REOPENED ---    
Severity: normal CC: agarplayerarlon, aronkvh, dannyg305, dcostroff, diego.ml, dimitri.code, enricobe, equeim, felixernst, greenscarf005, hi, jaxad0127, jon, kde.aerospace405, kfm-devel, martin.tlustos, rafael.palma.lima, rostislavkaleta, severin.hamader, spleefer90, xlkill4r
Priority: NOR    
Version: 23.08.4   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 6.1
Sentry Crash Report:
Attachments: Video of the issue
NEW Video of the issue

Description Venca B Spam 2024-03-19 19:46:18 UTC
SUMMARY

KDE Plasma in Wayland does not support Drag and Drop operations from Dolphin to Chromium (and Firefox).

STEPS TO REPRODUCE
1. Login to KDE Plasma with Wayland
2. Open web page accepting upload files with Drag and Drop in Chromium (or Firefox)
3. Open Dolphin folder where there is at least one readable file
4. Drag and drop that file to the web page area which accepts uploads

OBSERVED RESULT
Chromium does not upload the file, instead acts like it download such file.

EXPECTED RESULT
Drag and Dropped file shall be accepted by the upload area in the web page

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Kernel Version: 6.5.0-17-generic (64-bit)

ADDITIONAL INFORMATION

When tested on graphics platform X11 everything works well.
Comment 1 Enrico 2024-03-19 20:00:01 UTC
I've tested it on Plasma 6 (Drag & Drop a file from Dolphin to the VirusTotal page on Firefox) and it works fine.
On wayland .
Comment 2 teadrinkingprogrammer 2024-03-19 22:23:15 UTC
Can reproduce the bug on the following setup:

Operating System: Fedora Linux 39
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.12
Kernel Version: 6.7.9-200.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 3 Martin 2024-04-12 08:08:11 UTC
I can't reproduce the exact issue as OP, but I can 100% reproduce at least a very similar issue in the same browser on a more up to date setup.

Drag and drop seems to depend on last-touched window.

For example, if I drag a file from Dolphin over VSC(Electron) and then to the target Chromium window with https://www.virustotal.com/gui/home/upload it works fine.

But if the last thing I dragged over is Plasma notifications, it will have the red crossed out O and won't let me upload. In that state, I can change the last-dragged-through-element by hovering over VSC again and back to Chromium, and the icon will change and it will work.

Note that there is currently a bug in current Chromium versions where drag and drop will break the browser, and the workaround is to do drag and drop again without actually dropping the file to re-enable it. 

Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.3
Kernel Version: 6.8.4-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7600X 6-Core Processor
Memory: 62.0 GiB of RAM
Graphics Processor: NVIDIA GeForce RTX 4090/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X670 AORUS ELITE AX
Comment 4 Dimitri 2024-04-17 17:27:09 UTC
On Firefox, I have the issue only when dropping a second file like told in bug 483645 : https://bugs.kde.org/show_bug.cgi?id=483645
I don't know if this bug is the same and is related to switches between windows.
Comment 5 equeim 2024-05-08 23:56:20 UTC
It used to work in Plasma 5 after a bit of back-and-forth alt-tabbing between Dolphin and Firefox while "holding" the file, not it doesn't work at all. On Tumbleweed with Plasma 6.0.4 and Dolphin 24.02.2
Comment 6 Venca B Spam 2024-05-10 10:30:50 UTC
I found great workaround. If you want to use stable Plasma while keeping your laptop up-to-date, switch to Kubuntu 24.04.

It has Plasma 5, same as Neon had before switched to Plasma 6, and it is significantly faster!
Comment 7 raymo 2024-06-23 03:40:30 UTC
I can confirm this bug is now fixed on KDE 6.1.
Comment 8 aronkvh 2024-07-07 21:18:16 UTC
I'm using 6.1.2 on Tumbleweed, and I can't drag and drop to any chromium / electron applications.
Should I reopen this bug or create a new one?
Comment 9 jon 2024-07-22 17:16:31 UTC
I am and have been able to drag and drop into Firefox using Firefox in XWayland mode (MOZ_ENABLE_WAYLAND=0). In Wayland mode (MOZ_ENABLE_WAYLAND=1) I am unable to currently.

Plasma 6.1.3
Version 	128.0
Build ID 	20240719093654
Distribution ID 	archlinux
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Comment 10 Felix Ernst 2024-07-27 15:31:22 UTC
This bug might be related to https://bugs.kde.org/show_bug.cgi?id=469644 which has just been fixed.
Comment 11 greenscarf005 2024-08-15 00:53:21 UTC
I'm also unable to drag-and-drop images to firefox on following setup:

Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.5.0-44-generic (64-bit)
Graphics Platform: Wayland

> I am and have been able to drag and drop into Firefox using Firefox in XWayland mode (MOZ_ENABLE_WAYLAND=0). In Wayland mode (MOZ_ENABLE_WAYLAND=1) I am unable to currently.

I have tried both flag and neither worked.

> This bug might be related to https://bugs.kde.org/show_bug.cgi?id=469644 which has just been fixed.

tried `kwin_wayland --replace` but it crashed plasma and after that it did not fix the behavior.
Comment 12 Felix Ernst 2024-08-15 09:34:47 UTC
(In reply to greenscarf005 from comment #11)
> KDE Plasma Version: 6.1.3

> > This bug might be related to https://bugs.kde.org/show_bug.cgi?id=469644 which has just been fixed.
> 
> tried `kwin_wayland --replace` but it crashed plasma and after that it did
> not fix the behavior.

The bug report I linked states that this is fixed for Plasma 6.1.4. You indicated that you are on 6.1.3, so it not being fixed for you is expected.
Comment 13 greenscarf005 2024-08-17 02:07:50 UTC
(In reply to Felix Ernst from comment #12)
> (In reply to greenscarf005 from comment #11)
> > KDE Plasma Version: 6.1.3
> 
> > > This bug might be related to https://bugs.kde.org/show_bug.cgi?id=469644 which has just been fixed.
> > 
> > tried `kwin_wayland --replace` but it crashed plasma and after that it did
> > not fix the behavior.
> 
> The bug report I linked states that this is fixed for Plasma 6.1.4. You
> indicated that you are on 6.1.3, so it not being fixed for you is expected.

sorry, haven't noticed that. that said, even after i upgraded to plasma 6.1.4 the issue isn't solved at all.

Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.8.0-40-generic (64-bit)
Graphics Platform: Wayland
Comment 14 rostislavkaleta 2024-08-18 04:52:50 UTC
I can confirm the issue persists. Drag and drop isn't working across few other system apps I have used, like dragging file from Dolphin to Thunderbird as attachment, or to Slack or Discord. This has been an issue for me basically since KDE 6 (Wayland).
Comment 15 Martin Tlustos 2024-09-05 05:20:55 UTC
Doesn't work here, either

Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.8.0-40-generic (64-bit)
Graphics Platform: Wayland
Processors: 6 × AMD Ryzen 5 4500U with Radeon Graphics
Memory: 15,0 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Acer
Product Name: Aspire A515-44G
System Version: V1.12
Comment 16 Rafael Lima 2024-10-28 21:05:43 UTC
I am affected by this as well. Whenever I try to upload a file to a Chromium PWA (f.i. Google Drive as a Edge PWA) I get an error saying that the file is empty (or that it does not exist).

Is this a bug in Kwin really? Or is it a misconfigured web browser? I'm on Wayland
Comment 17 agarplayerarlon 2025-02-19 10:56:01 UTC
Created attachment 178579 [details]
Video of the issue
Comment 18 agarplayerarlon 2025-02-19 10:58:01 UTC
Hey, this issue is still present in 6.3.1

I've attached a video that clearly shows this issue.

Dragging files from Dolphin to Chromium doesen't work, while dragging files from Thunar to Chromium does indeed work.

The Preferred Ozone platform in Chromium is set to Wayland.
Comment 19 Jared Adams 2025-02-19 13:21:01 UTC
Same for Slack desktop app (Chromium based, Wayland version, from AUR). No problems dropping a file from Thunar to Slack, but Dolphin doesn't work. After trying with Dolphin, I had to close the window and open a new one to allow DnD again.

Operating System: CachyOS Linux 
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Dolphin Version: 24.12.2
Qt Version: 6.8.2
Kernel Version: 6.13.2-2-cachyos (64-bit)
Graphics Platform: Wayland
Comment 20 agarplayerarlon 2025-02-19 14:24:27 UTC
(In reply to Jared Adams from comment #19)
> Same for Slack desktop app (Chromium based, Wayland version, from AUR). No
> problems dropping a file from Thunar to Slack, but Dolphin doesn't work.
> After trying with Dolphin, I had to close the window and open a new one to
> allow DnD again.

yeah same issue.

I forgot to mention my system info:

Operating System: CachyOS Linux 
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Dolphin Version: 24.12.2
Qt Version: 6.8.2
Kernel Version: 6.13.3-2-cachyos (64-bit)
Graphics Platform: Wayland
Comment 21 Jared Adams 2025-02-19 18:17:32 UTC
I've tested Chromium on that machine (version 133.0.6943.98) and have no problems dragging files from Dolphin to it. So probably fixed in Chromium and Slack just needs to update the framework it uses.
Comment 22 agarplayerarlon 2025-02-19 18:19:30 UTC
(In reply to Jared Adams from comment #21)
> I've tested Chromium on that machine (version 133.0.6943.98) and have no
> problems dragging files from Dolphin to it. So probably fixed in Chromium
> and Slack just needs to update the framework it uses.

it's not fixed, othrwise i wouldn't have the issue.

gave you set the Preferred Ozone platform in Chromium to Wayland?
Comment 23 Jared Adams 2025-02-19 21:34:27 UTC
Chromium is on Wayland (verified with xprop). Works about half the time. Works all the time when forced X11.
Comment 24 Derek 2025-02-23 23:26:26 UTC
Any headway with this bug?  Most of the time dragging and dropping to any browser doesn't work.  There are times it does and I have yet to find the rhyme or reason why.
Comment 25 agarplayerarlon 2025-02-24 01:14:38 UTC
(In reply to Derek from comment #24)
> Any headway with this bug?  Most of the time dragging and dropping to any
> browser doesn't work.  There are times it does and I have yet to find the
> rhyme or reason why.

I've found out that if you have Dolphin and Thunar open at the same time, if you move a file from dolphin, make it hover over Thunar without dropping the file into it, then you move the file into Chromium, drag and drop will magically work.

This is not a fix, it's just some weird behavior I found out
Comment 26 Jared Adams 2025-02-24 02:34:09 UTC
That method fixes dropping to Slack desktop.
Comment 27 agarplayerarlon 2025-02-27 16:51:32 UTC
Created attachment 178948 [details]
NEW Video of the issue
Comment 28 agarplayerarlon 2025-02-27 16:55:07 UTC
I've attached a new video of the issue because I've discovered something new.

In this new video I was testing Nemo, and drag and drop will work if Nemo and chromium are in the same monitor, but if I move Nemo completely to the other monitor then drag and drop will not work, and I've discovered that the same behavior applies to Thunar too.

While with Dolphin drag and drop never works, whether the two windows are on the same monitor or not.
Comment 29 agarplayerarlon 2025-02-27 16:55:35 UTC
please developers fix this issue
Comment 30 agarplayerarlon 2025-02-27 16:58:07 UTC
Could this be a chromium wayland issue? as drag and drop on wayland works on firefox and firefox based web browsers with all file managers.
Comment 31 Rafael Lima 2025-02-27 17:31:41 UTC
(In reply to agarplayerarlon from comment #28)
> In this new video I was testing Nemo, and drag and drop will work if Nemo
> and chromium are in the same monitor, but if I move Nemo completely to the
> other monitor then drag and drop will not work, and I've discovered that the
> same behavior applies to Thunar too.

I'm using Ferdium and drag-and-drop only works if Dolphin and Ferdium are on the same monitor.

When the apps are in different monitors, drag and drop does not work.
Comment 32 Jared Adams 2025-02-27 19:13:12 UTC
(In reply to Rafael Lima from comment #31)
> (In reply to agarplayerarlon from comment #28)
> > In this new video I was testing Nemo, and drag and drop will work if Nemo
> > and chromium are in the same monitor, but if I move Nemo completely to the
> > other monitor then drag and drop will not work, and I've discovered that the
> > same behavior applies to Thunar too.
> 
> I'm using Ferdium and drag-and-drop only works if Dolphin and Ferdium are on
> the same monitor.
> 
> When the apps are in different monitors, drag and drop does not work.

I tlooks like Ferdium is Electron based, so would be affected by a Chromium bug.