Search terms or URI in the urlbar don't update when a user changes their default search engine until they reload the page
Categories
(Firefox :: Address Bar, enhancement, P3)
Tracking
()
People
(Reporter: jteow, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [sng-scotchbonnet-followon][scotchbonnet-persistsearchterms])
Attachments
(1 obsolete file)
The showSearchTerms
feature doesn't update the state of the urlbar if the user changes their default engine.
So if a user has this feature enabled, and switches their default search engine, existing tabs showing a default SERP will still show the search terms instead of the full URI.
Likewise, SERPs that were initially done via a non-default engine but become default will show the URIs.
The simplest way of solving this is to listen to when the engine changes. When it does, and if the user has the preference enabled, go through each tab and check the URI against _getSearchTermIfDefaultSerpUrl
. This however might be a major performance issue for browsers with a lot of tabs open.
Reporter | ||
Comment 1•2 years ago
|
||
We should look to keep userTypedValue
untouched if the user was the one who actually typed it and only flip the current url in the urlbar to search terms if the page is a newly default SERP AND userTypedValue
isn't populated by a value that the user provided. And likewise, a browser that was on a default SERP but is now no longer default should no longer be showing the search term in the urlbar.
There's two things to consider: selected browsers and non-selected browsers. When returning to an non-selected browser, UrlbarInput
will call setURI
due to onLocationChange
. Just by modifying a browsers userTypedValue
we can ensure returning to the tab will result in the change we desire.
However, for browsers that are in focus, we would need to manually call setURI
on the window's Urlbar when the default engine changes and certain conditions are met.
Assuming the pref is on, here are some states to consider:
- A browser that was on a default SERP and is showing the search term but is now a non-default SERP: It should show the full url.
- A browser that was on a default SERP and
userTypedValue
is what the user wrote, but the page is now a non-default SERP:userTypedValue
should remain the same. - A browser that was on a non-default SERP and is showing a URL but is now a non-default SERP: It should show the search terms.
- A browser that was on a non-default SERP and is showing a user typed term but is now a default-SERP: It should show what the user typed.
- A browser that was not on a default SERP is still not on a default SERP: Nothing should change.
Reporter | ||
Comment 2•2 years ago
|
||
Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Updated•1 year ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Updated•2 months ago
|
Description
•