Shift+Home in the address bar only highlights the part before the autocompleted part.
Categories
(Firefox :: Address Bar, enhancement)
Tracking
()
People
(Reporter: brian.m.gilbert, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0
Steps to reproduce:
Open a new tab, begin to type anything in the address bar which will autocomplete, but do not finish typing over the autocompleted part. Press Shift+Home.
Actual results:
The highlight will cover from where the cursor was (partway through the autocomplete) to the beginning. The part after where the cursor was which was autocompleted will not be highlighted.
Expected results:
It feels wrong to have text in an edit field after beginning with an empty edit field, typing something, then pressing Shift+Home, then pressing Delete or Backspace. I feel like pressing Shift+Home in this state should either highlight the entire contents of the edit field, or it should erase the autocomplete text and highlight everything the user has typed. In either case, pressing Delete or Backspace after the Shift+Home would result in an empty edit field.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•4 years ago
|
||
When you press Shift+Home in an input that already has a selection in it, the selection pivots around its starting location. In other words, the selection start stays where it is, and the end moves to the beginning of the input. When Firefox autofills a domain or URL, the selection start is just after the last character you typed, and the selection end is at the end of the input. So when you press Shift+Home, all that happens is the selection end moves to the beginning of the input.
As a general principle, I don't think we want to break the usual selection model.
I feel like pressing Shift+Home in this state should either highlight the entire contents of the edit field
That's possible, but it would mean the selection has to start at the end of the input, which I don't think makes intuitive sense.
or it should erase the autocomplete text and highlight everything the user has typed
Similarly, that would be unusual, and it opens up questions like what should happen if you press only Home, or the left arrow key?
It sounds like the reason you want the unusual Shift+Home behavior is so you can delete the input text more easily? You can press End or the right arrow key before pressing Shift+Home, and that will select all text.
Description
•