-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: grant user gestures (activeTab?) for omnibox events #684
Comments
I'm supportive of this change from the Chrome side. I think that accepting omnibox input is a fairly intentional action on the part of the user and (at least in Chrome) is clearly attributed to the extension. I don't think we should add user gestures for the "intermediate" events (OnInputStarted, OnInputChanged, OnInputCancelled, OnDeleteSuggestion), since, as ftirelo mentioned, I think the intentionality here is significantly lower on the part of the user. Other browser folks, do you have any concerns with adding a user gesture to the onInputEntered event? |
This Chrome official document says:
I agree that it is a user gesture, except it's a Chrome bug, not a feature request. |
Note that Chrome already grants activeTab for onInputEntered (code here). (FWIW, I'm less enthusiastic about that, since I think the association with entering something in the omnibox and running something on the page is lower -- but we don't have any plans to change it, since that would be a breaking change for existing extensions.) |
User gesture is disabled for omnibox events, which prevents an extension from opening the side panel [1]. The event changed in this CL is only enabled if the user types the keyword in the Omnibox, and the current UI makes it very clear that the extension now has control on what the user is typing, so this change is safe. Discussed with the Web Extensions Community Group in w3c/webextensions#684 We found this issue while implementing an extension that opens the side panel for a helper after the user typed a query in the keyword mode initiated by the extension, and getting the following error message: `Uncaught (in promise) Error: sidePanel.open() may only be called in response to a user gesture.` [1] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/extensions/api/side_panel/side_panel_api.cc;l=84;drc=3f4203f7dca2f7e804f30cfa783e24f90acd9059 Bug: 365076605 Change-Id: I74bb3015d59b62da741074a7c3e2a1bb678b3fb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5837605 Reviewed-by: Devlin Cronin <[email protected]> Commit-Queue: Fabio Tirelo <[email protected]> Cr-Commit-Position: refs/heads/main@{#1354800}
The PR that fixes the issue in Chromium has been submitted, and is available in the next Chrome Canary: https://chromium-review.googlesource.com/c/chromium/src/+/5837605 Are there any next step to close this issue here or can it be closed right away? I'm not used to having those discussions in the context of the Extensions API, so I'd like some guidance from a more experienced stakeholder. |
Firefox issue tracking this request: https://bugzilla.mozilla.org/show_bug.cgi?id=1542358 |
I have just updated the label on this issue, from
supportive: chrome
In the WECG we often keep issues open for a long time, and use the labels to signal support/implementation status across browsers. One browser implementing a request translates to an updated label, and is not necessarily a trigger for closing an issue. |
Note: during yesterday's WECG meeting, the question of whether omnibox should grant activeTab came up. Chrome's documentation already claims that the activeTab permission is granted: https://developer.chrome.com/docs/extensions/develop/concepts/activeTab#invoking-activeTab I checked Chrome's implementation, and can confirm that this is the case. It was implemented 12 years ago, in Chrome 21.0.1181.0: https://issues.chromium.org/issues/40616924#comment18 / https://source.chromium.org/chromium/chromium/src/+/33a86dbdc9c3df74c911d581d5cc72fd9b5723f6 So all together, the consensus can be summarized as granting user gestures on |
Looking for feedback from the community on this issue.
User gestures are disabled for omnibox events, which prevents an extension from opening the side panel [1]. Those events are only triggered if the user types the keyword in the Omnibox, and browser UI makes it very clear that the extension now has control on what the user is typing, so adding the gesture is safe.
We found this issue while implementing an extension that opens the side panel for a helper after the user typed a query in the keyword mode initiated by the extension, and getting the following error message:
Uncaught (in promise) Error: sidePanel.open() may only be called in response to a user gesture.
I have a WIP Chromium patch to add user gestures to
omnibox.OnInputEntered
: http://crrev.com/c/5837605We could optionally add user gestures to the other omnibox events, but user intent may not be as clear for those:
OnInputStarted
,OnInputChanged
,OnInputCancelled
,OnDeleteSuggestion
.[1] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/extensions/api/side_panel/side_panel_api.cc;l=84;drc=3f4203f7dca2f7e804f30cfa783e24f90acd9059
The text was updated successfully, but these errors were encountered: