Closed Bug 1195641 Opened 9 years ago Closed 8 years ago

Very cumbersome to copy URL in Browser

Categories

(Core :: DOM: Selection, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: manishearth, Unassigned)

References

Details

In the Gaia browser, when I tap the top bar, the entire URL is selected (so if I start typing, the contents are replaced) but there is no easy way to copy that URL. Tapping/tap-holding/etc just cancel the selection. Once the selection is gone it's possible to tap-hold and manually select, but this is very cumbersome (you need to drag the edges of the selection to either side).

Copying the entire URL is a pretty common task. It would be nice if tap-holding the already-selected URL would produce a copy/cut menu.
Component: Gaia::Browser → Selection
Product: Firefox OS → Core
Putting on Tims radar.
Flags: needinfo?(timdream)
I believe the Selection UI works per spec'd, i.e. don't show the UI if the selection is made by the content programmatically.

This can be workaround by doing the following (I agree it is cumbersome):

1. Long pressed the already selected text
2. Selection will be changed to the word you pressed and the bubble will show up.
3. Tap the select all button
4. Tap copy.

Ting-yu, should we ask UX to review this flow to see if this can be improved? Maybe the browser should not select the entire address programmatically? I wonder what the browser try to fulfill here -- maybe we should ask UX for rocketbar spec too.
Flags: needinfo?(timdream) → needinfo?(tlin)
I guess my suggestion is to make long press on a programmatically select-all'd field show the clipboard controls directly
There was a similar discussion in bug 1121468.

Actually, gecko does allow Selection.selectAllChildren() [1] to show the copy and paste menu. Message app used this API to implemented "Select text" context menu item to select entire message when long-pressing on a sent message. However, <input> does not have a similar way to select all text as far as I know.

For the other possible solution, I feel the proposal in bug 1121468 [2] makes sense. It could solve the issue that there's a visible selection without carets and copy & paste menu due to previous blur event. I'll ask UX to reconsider the proposal. 

[1] https://developer.mozilla.org/en-US/docs/Web/API/Selection/selectAllChildren
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1121468#c0
Flags: needinfo?(tlin)
See Also: → 1121468
Bug 1121468 is landed, which allows user to long press on the visible selection without carets to show the carets again.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.