Calling browser.search.search() leaves urlbar focused
Categories
(Firefox :: Address Bar, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr78 | --- | wontfix |
| firefox76 | --- | wontfix |
| firefox77 | --- | unaffected |
| firefox78 | --- | unaffected |
| firefox81 | --- | wontfix |
| firefox82 | --- | wontfix |
| firefox83 | --- | fixed |
People
(Reporter: guido+bmo, Assigned: daisuke)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
Depending on the "browser.newtabpage.enabled" and "browser.newtab.preload"
setting initiating a search in a new tab via browser.search.search()
will result in the urlbar being focused in the new tab.
I would consider this a bug because this differs with how the native search
from the urlbar and context menu work and it is inconsistent depending on
those two unrelated settings. Specifically, the urlbar will be focused after
calling browser.search.search() without specifying a tabId if
browser.newtabpage.enabled == false
or
browser.newtabpage.enabled == true
browser.newtab.preload == false
In all other cases focus is on the page content as it is with native search.
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Hello Guido,
Would it be possible to attach the extension you used to uncover this issue and maybe a screen recording of the issue?
Thanks in advance !
| Reporter | ||
Comment 2•5 years ago
|
||
You can easily reproduce this with my extension context-web-search by using its search function from the context menu.
Comment 3•5 years ago
|
||
Hello,
I have managed to reproduce the issue as per the provided STR on the latest Release (76.0.1/20200507114007) and Firefox 68.0 as orginally reported under Windows 10 Pro 64-bit and Ubuntu 16.04 LTS. The latest Nightly (78.0a1/20200527213321) and Beta (77.0/20200527121107) do not appear to be affected by the issue.
I have also performed a regression range on the issue and narrowed it down to https://bugzilla.mozilla.org/show_bug.cgi?id=1574169 (2020-05-28T14:13:09.407000: DEBUG : Found commit message:Bug 1574169 - Disable privileged content process for about:home for now. r=Gijs) with this differential revision https://phabricator.services.mozilla.com/D42209.
This is the corresponding pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=d87604ba6a877c9f33b0fdd7723766c7e27dac93&tochange=42888edce5d83190ba6644cab576b28a43068e19.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Seems like an issue in the urlbar
Comment 5•5 years ago
|
||
There is probably a race condition when webext uses addTab and the tab switcher focuses the urlbar.
I think the WebExtension api code should instead add a BrowserSearch.loadSearchFromExtension method and use the "webextension" telemetry source, that is the same code used by the contextual menu or the command line, so it should be a better tested path.
It can pass an openWhere param for "current", "tab" or "tabshifted".
If someone could try doing that and check if the problem is solved, it'd help a lot.
| Assignee | ||
Comment 6•5 years ago
|
||
I will take a look at this.
| Assignee | ||
Comment 7•5 years ago
|
||
Comment 9•5 years ago
|
||
| bugherder | ||
Updated•5 years ago
|
Description
•