Focusing the urlbar with the mouse sometimes doesn't select all because the URL shifts due to icons inserted/removed before it
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | fixed |
People
(Reporter: mak, Assigned: mak)
References
(Blocks 1 open bug)
Details
(Keywords: papercut, Whiteboard: [sng])
Attachments
(1 file)
Clicking on the urlbar to focus it, should normally Select All, so its contents are ready to be replaced.
Unfortunately often this doesn't work and I end up inserting some text in the middle of the URL.
I found this is due to a few (1px, 2px) mousemove between mousedown and mouseup, that I may inadvertently do.
This is normally not a problem, but because the URL shifts when we insert or remove icons before it, we end up causing a selection change (the mouse moved by 1 px, the url moved by many pixels, so now 1-3 characters are selected).
Other browsers solved this by not shifting the url between focused and unfocused state, though that means we can only have a fixed amount of space for icons before the url, we cannot dynamically insert or remove icons then.
Possible solutions to evaluate:
- don't collapse/uncollapse icons on focus change if mousedown. We can probably do this with a
mousedown
attribute and changing a fewfocused
css rules. Icons would instead appear/disappear on mouseup - we could ignore small mousemove (less than half of a character) when passing from focused to unfocused... this may potentially prevent some wanted selection change, or not catch larger mousemove that users with accessibility problems may do
Updated•7 months ago
|
Assignee | ||
Comment 1•7 months ago
|
||
Assignee | ||
Updated•7 months ago
|
Updated•7 months ago
|
Comment 3•7 months ago
|
||
bugherder |
Comment 5•14 days ago
|
||
Reproduced the issue with Firefox 129.0a1 (2024-07-03) on macOS 14.
The issue is verified fixed with Firefox 136.0a1 (20250128161837) and Firefox 135.0b9 (20250124091819) on Windows 10, macOS 14 and Ubuntu 22.
Description
•