Closed
Bug 1482551
Opened 6 years ago
Closed 6 years ago
Position the cursor at the end if searching the same text
Categories
(Firefox :: Address Bar, defect, P3)
Firefox
Address Bar
Tracking
()
VERIFIED
FIXED
Firefox 63
People
(Reporter: Mardak, Assigned: adw)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxsearch])
Attachments
(2 files)
Bug 1480503 added a search() api that activity stream uses to prefill with "@google " or "@amazon" etc. Turns out if the address bar already has "@google ", it will select all the text when clicking the "@google" tile.
Interestingly, if the text in the address bar is different, e.g., clicking @google then @amazon, the cursor is correctly at the end.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → adw
Status: NEW → ASSIGNED
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
adw, in the PR, we were about to work around the issue by setting `gURLBar.selectionStart = -1` after calling search.
Should be okay to just move that directly into the search method after setting textValue?
https://searchfox.org/mozilla-central/rev/2466b82b729765fb0a3ab62f812c1a96a7362478/browser/base/content/urlbarBindings.xml#1719
Flags: needinfo?(adw)
Comment 4•6 years ago
|
||
Reporter | ||
Comment 5•6 years ago
|
||
Comment on attachment 9001366 [details]
Bug 1482551 - avoid selecting url bar text on searches
Ed Lee :Mardak (PTO Aug 11-26) has approved the revision.
Attachment #9001366 -
Flags: review+
Pushed by elee@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/907a277d51d8
avoid selecting url bar text on searches r=Mardak
Reporter | ||
Comment 7•6 years ago
|
||
status-firefox62:
--- → fixed
Reporter | ||
Updated•6 years ago
|
Whiteboard: [fxsearch]
Comment 8•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Assignee | ||
Comment 9•6 years ago
|
||
(In reply to Ed Lee :Mardak (PTO Aug 11-26) from comment #3)
> adw, in the PR, we were about to work around the issue by setting
> `gURLBar.selectionStart = -1` after calling search.
>
> Should be okay to just move that directly into the search method after
> setting textValue?
>
> https://searchfox.org/mozilla-central/rev/
> 2466b82b729765fb0a3ab62f812c1a96a7362478/browser/base/content/urlbarBindings.
> xml#1719
Yes, sorry for dropping the ball on this needinfo.
Flags: needinfo?(adw)
Comment 10•6 years ago
|
||
I have verified that the issue is no longer reproducible in the latest Nightly (63.0a1, Build ID 20180816100035) and Beta (62.0b18 Build ID 20180816151750) on Windows 10, Mac 10.13 and Arch Linux x64. Subsequent clicks on the same or a different search shortcut will autocomplete the name and leave the cursor at the end of the sting, after an empty space.
You need to log in
before you can comment on or make changes to this bug.
Description
•