New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 610716 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 436489
Owner: ----
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Feature request: Open extension Popup from user action in a Context Menu

Reported by jayhe...@gmail.com, May 10 2016

Issue description

Could context menus be allowed to open an extension's Popup?

This can be achieved without compromising the philosophy of restricting Popup initiation to user actions.

For example, add a new property to the Context Menu Item and let the Popup page access the data which is currently made available to the Menu Item's onclick event. Developers could use something like...

in "background.js":

chrome.contextMenus.create({
  id: "myMenuItem",
  openPopup: true
  // popupPage: "altPopup.html"
  });


in "popup.js":

chrome.contextMenus.getInfo(function callback);


The onclick event would not fire when openPopup is set to True.


Why do this?

There are extensions which allow the user to get the definition of a selected word, or create a note from selected text or images. To create this functionality developers commonly request permission to inject scripts into every page the user visits. The alternative is to open a new tab and run the functionality in there. The former method leaves users not fully confident of what the extension has the potential to do with their data whereas the latter is a less appealing experience than could be achieved if the Popup was available.

Being able to open a Popup from a context menu would allow extensions developers to create a more consistent experience which can be used with confidence.
 

Comment 1 by jayhe...@gmail.com, May 10 2016

Specifically, the problem is when the extension requires a UI panel to display the word definition or the note.
Cc: ashej...@chromium.org
Components: Platform>Extensions
Labels: -Type-Bug Type-Feature
Status: Untriaged (was: Unconfirmed)
Marking the above issue as Feature request and Untriaged.

Dev team will take a call on the above request.

Thank  you!

Comment 3 by jayhe...@gmail.com, May 10 2016

Thanks.

I just realised there will be an issue with web pages running in app windows (on Chrome OS at least).

Until a few versions ago I could open a popup by using its shortcut keys even though there is no browser action button in the app window. That functionality is no longer available (and to be honest it was a bit odd-looking anyway). Implementing the above feature in app windows would represent a reversal of opinion on the question of whether popups should be enabled there. An alternative would be to disable these context menus in app windows, but that's far from ideal.

My preference in Chrome OS would be to move all the buttons to the top of the screen like in Macs, but that would be beyond the scope I'm sure ;-)
Mergedinto: 436489
Status: Duplicate (was: Untriaged)
The way we should solve this is with browserAction.openPopup, which could open an extension popup on some kind of user action.  Unfortunately, that's been blocked for quite awhile on security concerns, but I'd still like to see it happen at some point.

Since that could be trivially used to open a popup on contextMenu click, I'm going to dupe this into that issue.

Sign in to add a comment