Bug 1558506 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

In Firefox 69 triggering the context menu in the extensions options_ui embedded in about:addons doesn't open the context menu anymore.

The related tests defined in [browser_ext_optionsPage_popups.js](https://searchfox.org/mozilla-central/rev/0da35261b6789eec65476dbdd4913df6e235af6d/browser/components/extensions/test/browser/browser_ext_optionsPage_popups.js#35) are still able to trigger the context menu (I'm pretty sure that the test is still working [because it is currently triggering the event directly in the remote XUL browser](https://searchfox.org/mozilla-central/rev/0da35261b6789eec65476dbdd4913df6e235af6d/browser/components/extensions/test/browser/browser_ext_optionsPage_popups.js#35), instead of `BrowserTestUtils.synthesizeMouseAtCenter`) and so we missed to notice the regression.

Bisecting the issue pointed to Bug 1505909, which makes sense given that in Bug 1505909 the context menu internals have been adapted to make them Fission-aware.

After digging a bit, it seems to me that the context menu is actually being triggered, but the event is being intercepted and handled by the ContextMenuChild instance related to the "about:addons" page that contains the options_ui `browser` XUL element, before the ContextMenuChild related to the options ui extension page had any chance to intercept and handle it.

e.g. right-clicking on a `<a href="..."></a>` DOM element part of an extension options page,
is intercepted and handled as an event targeting the options_ui `browser` XUL element, instead of the DOM element part of the extension options page.

To quickly double-check that this is actually the case, I briefly tried to make [`ContextMenuChild`'s `handleEvent`](https://searchfox.org/mozilla-central/rev/0da35261b6789eec65476dbdd4913df6e235af6d/browser/actors/ContextMenuChild.jsm#454) to early exit and not handling the event if the composedTarget is a XUL `browser` element embedded, and at that point the expected context menu has been triggered on the extension page's `<a href="..."></a>` DOM element.
In Firefox 69 triggering the context menu in the extensions options_ui embedded in about:addons doesn't open the context menu anymore.

The related tests defined in [browser_ext_optionsPage_popups.js](https://searchfox.org/mozilla-central/rev/0da35261b6789eec65476dbdd4913df6e235af6d/browser/components/extensions/test/browser/browser_ext_optionsPage_popups.js#35) are still able to trigger the context menu (I'm pretty sure that the test is still working [because it is currently triggering the event directly in the remote XUL browser](https://searchfox.org/mozilla-central/rev/0da35261b6789eec65476dbdd4913df6e235af6d/browser/components/extensions/test/browser/browser_ext_optionsPage_popups.js#35), instead of `BrowserTestUtils.synthesizeMouseAtCenter`) and so we missed to notice the regression.

Bisecting the issue pointed to Bug 1505909, which makes sense given that in Bug 1505909 the context menu internals have been adapted to make them Fission-aware.

After digging a bit, it seems to me that the context menu is actually being triggered, but the event is being intercepted and handled by the `ContextMenuChild` instance related to the "about:addons" page that contains the options_ui `browser` XUL element, before the `ContextMenuChild` related to the options ui extension page had any chance to intercept and handle it.

e.g. right-clicking on a `<a href="..."></a>` DOM element part of an extension options page,
is intercepted and handled as an event targeting the options_ui `browser` XUL element, instead of the DOM element part of the extension options page.

To quickly double-check that this is actually the case, I briefly tried to make [`ContextMenuChild`'s `handleEvent`](https://searchfox.org/mozilla-central/rev/0da35261b6789eec65476dbdd4913df6e235af6d/browser/actors/ContextMenuChild.jsm#454) to early exit and not handling the event if the `composedTarget` is a XUL `browser` element embedded, and at that point the expected context menu has been triggered on the extension page's `<a href="..."></a>` DOM element.

Back to Bug 1558506 Comment 0