Closed Bug 1722118 Opened 3 years ago Closed 3 years ago

Official Firefox Flatpak cannot copy text on Wayland

Categories

(Core :: Widget: Gtk, defect)

Firefox 91
Desktop
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1729423

People

(Reporter: bugzilla, Unassigned)

References

(Blocks 1 open bug)

Details

Mozilla's official Firefox Flatpaks distributed through Flathub and Flathub-beta are unable to copy text to the system clipboard on Wayland.

Copying text from the URL bar or in HTML input fields, using Ctrl-C or the copy option in the right-click menu, seems to update the clipboard only for Firefox; pasting the text into the Firefox URL bar or into other HTML input fields works fine.

However, outside firefox, the Wayland clipboard is set to an empty string even if it was populated by something else originally. In other words, copying text in Firefox clears the system clipboard.

Pasting into Firefox from the system clipboard works just fine.

Interestingly, the JS clipboard API does not have this issue; a webpage that updates the clipboard using JS correctly updates the system clipboard for pasting into other applications.

This bug was originally reported two months ago for Firefox 88.0 on Reddit, and I just encountered it after trying out the Firefox Flatpak: https://redd.it/myften

No other Flatpak app I have tried seems to have this issue. I've tried Epiphany, Chromium, and even Fedora's Firefox Flatpak package using the Fedora runtime; this issue seems to be specific to Mozilla's Firefox package.

I've replicated this bug on Firefox 90.0.2 from flathub and on 91.0b6 on flathub-beta.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: General → Widget: Gtk
Product: Firefox → Core

So you say a Firefox flatpak from Fedora works correctly but Mozilla one fails?

Interestingly, the JS clipboard API does not have this issue; a webpage that updates the clipboard using JS correctly updates the system clipboard for pasting into other applications.

Looks like content process can do the paste while chrome can't.

I wonder if that's caused by some extra patches Fedora ships ahead of upstream but I'm not aware of any 'copy to clipboard' bugs as we use standard Gtk interface there. May be caused flatpak sandbox. Jan do you know if there's any flatpak sandbox rules for clipboard?

Blocks: flatpak
Flags: needinfo?(jhorak)

Perhaps this should also block 1665817.

Which distro do you use? I tested Mozilla flatpak on Fedora 34 / Gnome and clipboard works as expected.

Flags: needinfo?(jhorak) → needinfo?(bugzilla)

I'm on Fedora 34 / Sway. I'll see if I can submit a Wayland debug log later today.

Flags: needinfo?(bugzilla)

Can you try to re-test with nested mutter compositor or with KWim?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_different_Wayland_compositor
Thanks.

Flags: needinfo?(bugzilla)

I had the same issue (I could not copy text into the system clipboard), but it works when launched as

WAYLAND_DISPLAY=wayland-1 MOZ_ENABLE_WAYLAND=1 flatpak run org.mozilla.firefox

To provide a complete picutre, I previously launched firefox as

flatpak run org.mozilla.firefox

I'm running on Void Linux and Sway.

I already have those vars set in my system, and even passing them into flatpak with --env args didn't change anything.

I'm unable to test with mutter or KWin atm.

Flags: needinfo?(bugzilla)

I had the same issue and added "org.freedesktop.secrets" to the Session Bus Talks setting using Flatseal and copying works as expected on Wayland now

(In reply to OSCrustacean from comment #9)

I had the same issue and added "org.freedesktop.secrets" to the Session Bus Talks setting using Flatseal and copying works as expected on Wayland now

I just tried this, and nothing changed. Fedora 34, Sway 1.6.1.

IDK if flatpak bus privs are case-sensitive; if they are, "secrets" needs to be capitalized.

This is likely caused by outdated gtk. Sway needs at least gtk 3.24.24 for clipboard to be fully working, but freedesktop runtime 20.08 uses 3.24.21.

Seems to work fine now with FF94 and fdo runtime 21.08

(In reply to rob.ceglinski from comment #12)

Seems to work fine now with FF94 and fdo runtime 21.08

Dupe of Bug 1729423 then.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.