Closed Bug 1353073 Opened 3 years ago Closed 3 years ago

context menus do not work when webextensions.remote=true

Categories

(WebExtensions :: Frontend, defect)

49 Branch
defect
Not set

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

References

Details

(Whiteboard: triaged)

Attachments

(1 file)

content.js calls sendRpcMessage which is normally picked up by tabbrowser.  However, when a webextension panel is remote, tabbrowser does not receive the message (at least in sidebar, unable to test popup due to bug 1353060).  

Simply relaying the message also does not work so we need to handle the contextmenu message in the sidebar panel.
Attachment #8854069 - Flags: feedback?(kmaglione+bmo)
Blocks: 1353136
Comment on attachment 8854069 [details]
Bug 1353073 handle contextmenu in sidebar when remote=true,

https://reviewboard.mozilla.org/r/126050/#review130604

::: browser/base/content/webext-panels.js:16
(Diff revision 1)
>    promiseEvent,
>  } = ExtensionUtils;
>  
>  const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
>  
> +function handleContentContextMenu(aMessage) {

It would be nice if we didn't have to duplicate all of this. Can we add a helper to `nsContextMenu` instead?
Attachment #8854069 - Flags: feedback?(kmaglione+bmo) → feedback+
Sorry for the delay. I'm not in the habit of looking at my feedback queue.
Assignee: nobody → mixedpuppy
Whiteboard: triaged
No longer blocks: 1353136
Comment on attachment 8854069 [details]
Bug 1353073 handle contextmenu in sidebar when remote=true,

https://reviewboard.mozilla.org/r/126050/#review133060
Attachment #8854069 - Flags: review?(kmaglione+bmo) → review+
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fc91bd1a27a7
handle contextmenu in sidebar when remote=true, r=kmag
Backed out for eslint failures like https://public-artifacts.taskcluster.net/RxRKHCfPQd-_TLs9ctx74A/0/public/logs/live_backing.log

Error hiding in full log:
[task 2017-04-15T07:27:18.629452Z] Error: ENOENT: no such file or directory, open '/home/worker/checkouts/gecko/browser/base/content/browser.js nsContextMenu.js'

https://hg.mozilla.org/integration/autoland/rev/9a16c329034e
Flags: needinfo?(mixedpuppy)
Sigh.  update eslint and it caught it this time.
Flags: needinfo?(mixedpuppy)
Pushed by mixedpuppy@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/3244c4fd84a1
handle contextmenu in sidebar when remote=true, r=kmag
https://hg.mozilla.org/mozilla-central/rev/3244c4fd84a1
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.