Bug 411682 - Copy-paste doesn't work in firefox
Summary: Copy-paste doesn't work in firefox
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.18.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-07 19:04 UTC by cacarry
Modified: 2020-05-27 19:32 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cacarry 2019-09-07 19:04:24 UTC
SUMMARY
Someone reported this on Firefox bugtracker: https://bugzilla.mozilla.org/show_bug.cgi?id=1567762
Firefox guys said, that this is KDE's issue.

STEPS TO REPRODUCE
1. Open firefox
2. Copy something in firefox or outside firefox
3. Paste in firefox or outside

OBSERVED RESULT
Copy-paste doesn't work

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0
Nvidia driver: 435.21

ADDITIONAL INFORMATION
Someone on firefox bugtracker suggested to try wl-clipboard. I tried it and it doesn't work on KDE for wayland.
Comment 1 Rainer Finke 2019-10-12 07:33:49 UTC
I have the same issue with Firefox-nightly Wayland as said in my comment in this bug https://bugs.kde.org/show_bug.cgi?id=397834.

Operating System: Arch Linux 
KDE Plasma Version: 5.16.90
KDE Frameworks Version: 5.62.0
Qt Version: 5.14.0
Kernel Version: 5.3.6-arch1-1-ARCH
OS Type: 64-bit
AMD GPU
Comment 2 David Edmundson 2019-12-07 18:13:01 UTC
Please share your wl-clipboard commands you did which didn't work
Comment 3 David Edmundson 2019-12-07 19:58:47 UTC
wl-clipboard copy paste work fine here.

Closing till we get more info
Comment 4 Seqularise 2019-12-08 07:04:14 UTC
(In reply to David Edmundson from comment #3)
> wl-clipboard copy paste work fine here.
> 
> Closing till we get more info

are you sure that you are using wayland backend for firefox? (you can check it 
in about:support)
Comment 5 Rainer Finke 2019-12-08 13:08:48 UTC
I did set in "/etc/environment" the "export MOZ_ENABLE_WAYLAND=1" environment variable. With this I see in Firefox-nightly (webrender is enabled too) in about:support that the Window Protocol is set to Wayland. 
Copy and paste from any application to Firefox doesn't work, not even from Firefox to Firefox, only from Firefox to another application.
Comment 6 cacarry 2019-12-11 22:04:35 UTC
Start firefox with: MOZ_ENABLE_WAYLAND=1 firefox-developer-edition (i wrote that by hand because copy does not work)

Tests FF on wayland:

1. Copy from firefox to X11 app: works
2. Copy from firefox to wayland app: works

3. Copy from X11 app to firefox: not working
4. Copy from wayland app to firefox: not working

5. Copy from firefox and execute wl-paste in yakuake: works
6. Copy using "wl-copy test text" in yakuake: not working, wl-paste in terminal pastes copied text

Firefox 72.0b5
Comment 7 cacarry 2019-12-11 22:06:20 UTC
Ah, forgot:
kwin 5.17.4
qt 5.13.2
kde frameworks 5.64.0
nvidia blob 440.36
Comment 8 cacarry 2019-12-11 22:23:38 UTC
Also forgot:
1. Copy from firefox to firefox, same tab, same text field: now working
Comment 9 Bug Janitor Service 2019-12-26 04:33:07 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 cacarry 2019-12-26 08:21:59 UTC
I thought i shouldn't change status
Comment 11 Rainer Finke 2020-04-04 15:24:23 UTC
This bug is the main reason why I cannot use Firefox on Wayland. Is this a bug of kwin or Firefox?

Tested with Firefox Nightly 2020-04-03, Plasma 5.18.4, KDE Frameworks 5.68, Qt 5.14.1.
Comment 12 XmainframeX 2020-04-10 09:09:23 UTC
I'm observing the same issue: copy works, past doesn't in wayland firefox in KDE.

Some more Info:
- The same issue appears also for wayland thunderbird in KDE.
- The issue does not show up in wayland firefox or thunderbird in gnome.
- The issue does not show up in other wayland GTK Apps I tested in KDE.
- The issue does not show up in wayland firefox or thunderbird in KDE on default dialogue windows such as the "safe page as..." dialogue or "Add files as attachment" dialogue (sorry, don't know the exact english translation of the window titles)
Comment 13 sbw 2020-04-11 07:13:02 UTC
Same problem with Nightly 2020-04-10 on Wayland session. FF is start with MOZ_ENABLE_WAYLAND=1 environment variable.

Some tests:
1. copy/paste on docs.google.com: Works
2. copy/paste on bugs.kde.org: Not work
3. copy from docs.google.com, paste to terminal: Works
4. copy from bugs.kde.org, paste to terminal: Works
5. copy from terminal, paste to docs.google.com: Not work
6. copy from terminal, paste to bugs.kde.org: Not work
Comment 14 David Edmundson 2020-05-13 01:35:01 UTC
Firefox has multiple datadevices for the same surface (via multiple seats)

We only send to the first one.

Should be an easy fix now \o/
I did a quick hack and can now paste.
Comment 15 David Edmundson 2020-05-13 02:07:27 UTC
WIP: https://phabricator.kde.org/P599
Comment 16 David Edmundson 2020-05-26 13:28:06 UTC
This was fixed. 31ea954b4fcfa2873a89847b90f33b5599dfdb7a in kwayland-server