Closed Bug 226853 Opened 21 years ago Closed 17 years ago

Single-click select in location bar does not copy URL to primary clipboard


(Firefox :: Address Bar, defect)

Not set





(Reporter: mozbugs2, Unassigned)



User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7

Clicking on the URL bar to select the current URL text should immediately place
that text in the primary clipboard.  However, a double click is now required.

In about:config my preference for clipboard.autocopy is set to true.

Reproducible: Always

Steps to Reproduce:
1. Put something in the primary clipboard (select some text, or whatever)
2. Click once on the location bar - the URL becomes highlighted (selected)
3. Middle click elsewhere to try to paste that URL

Actual Results:  
The original text from step 1 is still in the clipboard and is pasted.

Expected Results:  
The URL from the location bar should be in the clipboard and pasted.
This is because the current default action is to select the URL when you click
in  the location bar (if you want to paste using middle button then you can
click, delete, then paste). Otherwise single click on address bar overwrites
your paste buffer. This is pretty awkward, and it's been discussed at length,
I'm not sure what decision (if any) was reached about what the best way of
implementing this is though.
In X, selecting text in apps generally puts it straight into the primary buffer.
 So if you're used to the way X operates, IMHO you're likely to expect the copy
to happen immediately.  AFAIK this is the way Mozilla has always operated in X.
 Hence the usefulness of being able to middle-click paste anywhere (not in a
form) in the body of the browser window in order to go there.

It would just be nice if clipboard.autocopy set to true caused the behaviour
described above.  If people are migrating from Windows and expect to be able to
select the URL in the location bar and delete it before pasting in another URL,
then they should be able to set clipboard.autocopy to false.
I agree that the current behaviour is wrong (does not match X), I was just
trying to explain the reason that it's currently being done that way. I think
it's basically a workaround because the URL is automatically selected on first
click (which is useful for other reasons, like typing over the top of it).

Like I said before I think it's being discussed, some changes will need to be
made.If I could find the bug(s) that are addressing the issue then I would point
you to them, you might find them under dependencies of bug 144260. I am sure
I've seen this topic discussed before, but not sure where.
*** Bug 231167 has been marked as a duplicate of this bug. ***
-> Confirming to let the decision makers decide if we want this
Blocks: 144260
Ever confirmed: true
Assignee: firefox → bryner
(windows version)
Clicking once to highlite the URL, followed by pressing ctrl-c, still does not
copy the URL into the clipboard.  You have to manually highlite the URL with the
mouse before ctrl-c will work.
This is not an issue for me personally anymore.  On the Linux builds (at least
my Debian gtk2 build), clicking in the URL bar no longer highlights the URL,
just places the cursor there, so there's no expectation that the URL will be put
into the clipboard.
natch, this is a bug about Linux behaviour. What you described works for me in
Windows, but if you are seeing a bug please file a new bug.

Alistair, same for me in Linux, so feel free to resolve this bug, it should
probably be marked as DUPLICATE of whatever bug was fixed to solve the
problem... if you can find it, otherwise WFM is probably OK (as far as I know).
The reason I was encountering this bug was because of Bug 218315 which has now
been resolved - the browser.urlbar.clickSelectsAll setting was ignored.

However if browser.urlbar.clickSelectsAll is manually set to true in
about:config, the behaviour mentioned in this bug - that text selected in the
location bar with a single click is not copied to clipboard - still exists.  I'm
not sure if this is a 'bug' we want fixed or not though, as people enabling
browser.urlbar.clickSelectsAll probably do not want it going into the clipboard,
despite the fact that selected text not going into the primary buffer is
contrary to normal X11 behaviour.

I'm going to leave this open for someone else to decide if the current
functionality is desired.
Assignee: bryner → nobody
Component: General → Location Bar and Autocomplete
QA Contact:
Blocks: 393828
No longer blocks: 393828
Depends on: 393828
fixed by bug 393828
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.