[Search Quantumbar] Wrong search query after selecting a one click search engine with keyboard
Categories
(Firefox :: Address Bar, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | affected |
People
(Reporter: laszlo.bialis, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fixed by bug 1527946])
Note
- Make sure "browser.urlbar.quantumbar" is set to "true" in about:config
Affected versions
- Nightly 67.0a1
Affected platforms
- Win10 x64, macOS 10.14, Ubuntu 16.04
Steps to reproduce
- Enter a search query in the Quantumbar (use a previously unused query)
- Press "↓" key until one of the one-click search buttons are selected
- Hit Enter key
Optional: - Right click on the same or any other one-click search engine
- Select to Search in new tab
Expected result
- Results should show using the search query typed in Quantumbar.
Actual result
- If only search suggestions are available, after step 3 the search is done using the last search suggestion from the list, not the actual word typed in the Quantumbar.
- Same happens (the last available search suggestion is taken in account) if steps 4 and 5 are made, but in a new tab.
- The issue happens only with search suggestions, if the last item in the list is a history item, the search is done with the search query typed initially.
Additional notes
- The issue affects Quantumbar only, I didn't encounter the issue in Awesomebar
Comment 1•6 years ago
|
||
I believe this is intentional... if you've arrowed down, you've essentially selected the last search suggestion. Then arrowing onto the one-offs, you're using that last selection.
If you alt-down (or up) to the one-offs (or click them) then it'll use the search suggestion you're on.
Comment 2•6 years ago
|
||
Hm, I think it's not intentional, because he arrowed down to one-offs, so the text in the input field has been reverted. The only thing selected is the one off.
If he'd alt-down from a suggestion to one-offs, then it would be right to use the suggestion (and there's a double selection, that Imo we should not have, anyway)
Comment 3•6 years ago
|
||
And by that I mean that I think the interaction should ideally work like this:
case a: down until one-offs are reached, the text is reverted and one-offs should act on what the user typed
case b: down until a suggestion, then move to one-offs (alt down, in the future just press TAB) the input text is still the one from the last selected suggestion, one-offs act on the suggestion text
Basically, one-offs should always act on what is in the input field, moving to one-offs should either reset the field or not depending on how we reached them (down reverts, alt+down doesn't).
Comment 4•6 years ago
|
||
Marco's right. The search string in this case is set here: https://searchfox.org/mozilla-central/rev/d6f8590a91b71d64a1d0471cac38b6aadbe2a6e2/browser/components/urlbar/UrlbarInput.jsm#306
So either _resultForCurrentValue is wrong or shouldn't be used, or this._lastSearchString is wrong or shouldn't be used, or both. Seems like we should just be using this.value? Since the input should contain the suggestion if a suggestion is highlighted, or the user's text if no suggestion is highlighted.
Updated•6 years ago
|
Comment 6•6 years ago
|
||
does it include a test?
Comment 7•6 years ago
|
||
Confirming this doesn't happen anymore.
Description
•