Open Bug 1745873 Opened 3 years ago Updated 9 months ago

text selection does not set X PRIMARY selection

Categories

(Core :: DOM: Selection, defect)

Firefox 91
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: dicktyr, Unassigned)

References

()

Details

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

Steps to reproduce:

  • automatically select location bar text by mouse click or key binding

  • deselect text in the location field and reselect by "Select All" key binding

both should independently produce expected result but both fail

Actual results:

X PRIMARY selection is not set

Expected results:

X PRIMARY selection should be set

as it is when selecting manually by arrow keys or by mouse

this has been an issue for many releases but I don't recall when it started

I left "location" out of the title because I think I've seen the same behavior elsewhere but I don't recall where at the moment

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

Component: Untriaged → DOM: Selection
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE

reopened as this is related but not a duplicate

in this case, Firefox fails to register a new text selection when the text is selected automatically
but it correctly registers the selection when made manually

Status: RESOLVED → UNCONFIRMED
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Resolution: DUPLICATE → ---
Summary: text selection does set X PRIMARY selection → text selection does not set X PRIMARY selection
URL: 103564
Severity: -- → S3

I can confirm that this still happens in Firefox 118.0.2 (32-bit). Manually reselecting text sets the X11 primary selection.

I find this behaviour extremely annoying, especially when trying to paste the URL of the current page in a text field.

Whenever I focus the address bar and then middle click somewhere else, Firefox does not paste the current URL.

it's surprising that this bug persists with so many Linux users affected by it
(surely some of Mozilla's own people use Linux)

maybe somebody will post it on Reddit or the like and get some attention

in any case, I imagine it's an easy fix
so please fix it!

further testing shows this bug affects input elements but not textarea elements

this is a serious UI defect (which would not be tolerated under macOS, for example)

its also worth noting that it seems to have persisted for at least 7 years!

the following bugs appear to be directly related

bug 1333161
bug 1593761

Some of this might be intentional-ish. Is this specific to the urlbar? See bug 1457355

See Also: → 1457355
You need to log in before you can comment on or make changes to this bug.