Closed Bug 1717305 Opened 4 years ago Closed 3 years ago

copy from address bar in sway (wayland) doesn't work

Categories

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

Firefox 89
Unspecified
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1791417

People

(Reporter: p.ch, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: papercut, Whiteboard: QA-not-actionable)

Attachments

(2 files)

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

Steps to reproduce:

  1. Open Firefox 89 on Linux on the Sway desktop manager
  2. Go to any web page
  3. Highlight any or all of the address in the address bar
  4. Press Ctrl+c or right-click and click copy
  5. Try and paste in any application other than Firefox

Actual results:

The clipboard is empty, the address you just copied is not there

Expected results:

The copied section of the address bar should be in the clipboard

Note that copying from the web page still works and copying from the address bar to any other place inside the same Firefox instance/profile still works.

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

Component: Untriaged → Address Bar
Blocks: wayland-sway
Severity: -- → S3
Priority: -- → P3
OS: Unspecified → Linux

Hello! I have tried to install sway on my wayland machine but unfortunately it is difficult to install it. At the moment we do not have the right environment to test this issue.

Thank you and have a nice day!

Whiteboard: QA-not-actionable

Drew, do you think this issue is Proton related?

Flags: needinfo?(adw)

Right-clicking a link and selecting "Copy Link" also does not work.

Commenting out the second CopyStringToClipboard in nsClipboardHelper::CopyString which copies to the selection clipboard fixes my issue. I'm a bit skeptical about needing this, as the normal copy on a web page does not have this second call to copy to the selection clipboard, but I could be wrong. The second copy was added for bug 39055.

I have found this gtk bug which may be the root cause even if it's quite old: https://bugzilla.redhat.com/show_bug.cgi?id=1367591

(In reply to Adrian Florinescu [:aflorinescu] from comment #3)

Drew, do you think this issue is Proton related?

It's probably not related to Proton, but it's not clear if this is a problem in the urlbar or something in Gecko.

Flags: needinfo?(adw)

I've noticed the same thing in KDE Plasma v5.23.5 and v5.24.0:

  • Copy from other parts of the browser work, like selecting text from a page or text from a text input box.
  • Only happens on wayland AND when running with MOZ_ENABLE_WAYLAND=1 - if I unset MOZ_ENABLE_WAYLAND then copy-paste of the address bar works correctly

Attached is a dump of the about:support details "2022-02-09 about support from Firefox beta 98.0b2 on KDE Plasma 5.24.0 with Wayland.txt"

Keywords: papercut

I've just re-tested with FF 100.0b3 + KDE Plasma 5.24.4 and the issue seems to be fixed - can other users confirm? I'll attach the about:support details.

(In reply to Jay Tuckey from comment #9)

I've just re-tested with FF 100.0b3 + KDE Plasma 5.24.4 and the issue seems to be fixed - can other users confirm? I'll attach the about:support details.

I can reproduce the issue in FF 99.0 on KDE Plasma 5.24.4, I haven't tried FF 100.0b3 yet. Was something relevant changed between 99.0 and 100.0b3?

Update:
I just tested with FF 100.0b4 on KDE Plasma 5.24.4. The issue is not solved for me, I still have the problem.

I've found a workaround. If I copy the text from the URL bar, then paste it into a HTML TextArea field, then select the text and re-copy from the TextArea, then the text is now in my clipboard, and I can past in other applications.

For me the bug appears in Right-Click->Copy Link on hrefs, as well as the address bar text, and the standalone search bar text.
All other text (eg, text on a webpage) will go into the clipboard without issues.

This also happened with GNOME 41.2 + FF 98.0.2.
The problem only occurred after several time using the Firefox with MOZ_ENABLE_WAYLAND=1.
After restarting, the copy paste working again.

I'm having the same issue as Ashley in FF 101.0a1 (Nightly) on KDE Plasma 5.24.4 (KDE Neon User Edition 20.04). I can copy text from webpages, but copying directly from the address bar just clears the clipboard.

Interestingly enough, this only happens on native versions of Firefox. When I install Firefox from the Ubuntu repos or as a binary from Mozilla's website, or Nightly from the PPA, I cannot copy from the address bar under wayland, but I can copy from text boxes on pages. However, both the Firefox snap package and flatpak let me copy from the address bar just fine.

See Also: → 1770723

I'm seeing similar behavior in compositors based on Smithay. Copying works from the body of the page, but not the URL bar. Though from WAYLAND_DEBUG logs, it seems to transfer an fd to send the data just fine, but doesn't write the text. Which makes it look like a Firefox bug rather than a compositor issue.

But I don't see this issue on Sway. The only obvious difference from the debug logs is Sway supporting the primary selection protocol. Given that and the comment above about CopyStringToClipboard, I'm guessing it's broken on compositors that don't implement that protocol (which shouldn't be necessary for the clipboard to work)? Still need to test to verify that.

(I don't know if that would apply to compositors others are seeing issues on.)

Confirmed that implementing the primary selection protocol in a Smithay-based compositor resolved the issue of copying from the url bar to other programs.

So that's one possible trigger for the bug, which should be addressed since a Wayland compositor is not necessarily expected to implement this protocol. I don't know if that would be an issue with the compositors other people here are seeing issues with.

I switched from KDE Neon 20.04 to Fedora 36 and I no longer have this bug, despite the same setup. This bug was present on fresh installs of Neon 20.04, so perhaps it's a Ubuntu issue rather than a Firefox one.

(In reply to Ian Douglas Scott from comment #16)

Though from WAYLAND_DEBUG logs, it seems to transfer an fd to send the data just fine, but doesn't write the text. Which makes it look like a Firefox bug rather than a compositor issue.

That sounds exactly like what is observed in this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1731511
I wonder if they are related, or even the same cause.

The only obvious difference from the debug logs is Sway supporting the primary selection protocol. Given that and the comment above about CopyStringToClipboard, I'm guessing it's broken on compositors that don't implement that protocol (which shouldn't be necessary for the clipboard to work)
implementing the primary selection protocol in a Smithay-based compositor resolved the issue of copying from the url bar to other programs.

That is really odd. Does having implemented Primary-Selection-Protocol change they way Firefox pipes data to wayland fd? I wonder if that fixes bug 1731511 too.

This looks to be a widget issue and not address bar specific

Component: Address Bar → Widget: Gtk
Product: Firefox → Core
Duplicate of this bug: 1810490

Is there any update on this?

Would it be a feasible solution that links are treated just like normal text? To my best knowledge, normal text can be copied without any problems and I am not sure why a textual link and some text would/should differ in handling.

@Martin You are probably aware, bug 1791417 is a duplicate of this bug. It seems like more investigation work has been done in that thread than in this original thread. Is there a way to merge them?

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

Attachment

General

Creator:
Created:
Updated:
Size: