Omnibox API: onInputChanged runs in private windows but suggestions do not appear
Categories
(Firefox :: Address Bar, defect)
Tracking
()
People
(Reporter: tdulcet, Assigned: gregp)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
The omnibox.onInputChanged()
event fires in private windows, but the suggestions do not appear. I tested in latest Firefox 91 ESR, Firefox 102 and Nightly 104, although I have noticed this issue for a while. It seems it was not fully fixed in bug 1516706. The suggestions work with incognito windows in Chrome.
A quick search shows other users have reported this issue on:
- Mozilla Discourse: https://discourse.mozilla.org/t/how-does-omnibox-addsuggest-work-in-private-mode/74076
- Firefox Reddit: https://www.reddit.com/r/firefox/comments/l0fblt/how_does_omnibox_addsuggest_work_in_private_mode/
- and Stack Overflow: https://stackoverflow.com/q/65738628
All three of those links include an example extension to reproduce the issue.
Reporter | ||
Updated•2 years ago
|
I was able to reproduce this on FF Release and Nightly and I will add an attachment in order to show the problem
Comment 3•2 years ago
|
||
Does the extension have the private browsing permission granted?
Reporter | ||
Comment 4•2 years ago
|
||
(In reply to Tomislav Jovanovic :zombie from comment #3)
Does the extension have the private browsing permission granted?
Yes, without that private browsing permission the omnibox.onInputChanged()
event does not fire, but either way, the suggestions do not appear.
Comment 5•2 years ago
|
||
The severity field is not set for this bug.
:mixedpuppy, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 6•2 years ago
|
||
Also verified. I started to trace into the UrlbarProviderOmnibox.sys.mjs stuff, but figure Drew might be faster. The limitation is somewhere in the urlbar code, the api makes no distinction about the private status of the window. Events are fired, suggestions returned, just no results in UI.
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Search suggestions are disabled by default in private browsing mode. This can be changed under Settings -> Search -> Search Suggestions.
Is that causing the issue here?
Reporter | ||
Comment 8•2 years ago
|
||
(In reply to Mark Banner (:standard8) (afk until 8th Aug) from comment #7)
Is that causing the issue here?
No, that option makes no difference (see the links in comment 0). Either way, the omnibox.onInputChanged()
event fires, but the suggestions do not appear.
Add-ons that use the Omnibox API are also not a "search engine", so that option should not apply anyway, as it would be completely undiscoverable for users. If the user explicitly enables an add-on in their private windows, the Omnibox API should then fully work as expected, as it always has in Chrome.
Comment 9•2 years ago
|
||
We have explicit code that disallows suggestions coming from "unknown" sources in the urlbar:
https://searchfox.org/mozilla-central/rev/c0bed29d643393af6ebe77aa31455f283f169202/browser/components/urlbar/UrlbarProvidersManager.sys.mjs#732-733
https://searchfox.org/mozilla-central/rev/c0bed29d643393af6ebe77aa31455f283f169202/browser/components/urlbar/UrlbarProviderOmnibox.sys.mjs#121,151
I'm not sure what's the expected policy here, if the extension already needs explicit approval to work in PB mode maybe we should remove that private check?
The idea was that being the source unknown and a private session, we wanted to avoid "surprises", but this is already prevented by the user having to enable the addon in private sessions.
We could thus introduce a RESULT_SOURCE.ADDON (just in case we need to identify them) and handle it like RESULT_SOURCE.OTHER_LOCAL.
Does this make sense Shane?
Assignee | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/64f9426ccca4 Let omnibox API work in private windows r=mak
Comment 12•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Comment 13•5 months ago
|
||
Verifies as fixed in Latest Firefox Nightly(121.0a1 ) and Firefox Release(119.0.1) and search suggestions are similar in Normal and Private windows.
I will mark the issue as verified.
Description
•