Closed Bug 1779400 Opened 2 years ago Closed 1 year ago

Omnibox API: onInputChanged runs in private windows but suggestions do not appear

Categories

(Firefox :: Address Bar, defect)

defect

Tracking

()

VERIFIED FIXED
110 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox102 --- wontfix
firefox103 --- wontfix
firefox104 --- wontfix
firefox110 --- fixed

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:

All three of those links include an example extension to reproduce the issue.

Blocks: 1166831
Depends on: 1516706

I was able to reproduce this on FF Release and Nightly and I will add an attachment in order to show the problem

Status: UNCONFIRMED → NEW
Ever confirmed: true

Does the extension have the private browsing permission granted?

Flags: needinfo?(tdulcet)

(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.

Flags: needinfo?(tdulcet)

The severity field is not set for this bug.
:mixedpuppy, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mixedpuppy)

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.

Flags: needinfo?(mixedpuppy) → needinfo?(adw)
Component: Frontend → Search
Product: WebExtensions → Firefox

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?

Component: Search → Address Bar

(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.

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?

Flags: needinfo?(adw) → needinfo?(mixedpuppy)
Assignee: nobody → gp3033
Status: NEW → ASSIGNED
Flags: needinfo?(mixedpuppy)
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/64f9426ccca4
Let omnibox API work in private windows r=mak
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch

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.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: