Closed Bug 1417043 Opened 7 years ago Closed 6 years ago

Drop down menus broken in extension defined devtools panels on Windows

Categories

(WebExtensions :: Developer Tools, defect, P2)

57 Branch
defect

Tracking

(firefox60 verified)

VERIFIED FIXED
mozilla60
Tracking Status
firefox60 --- verified

People

(Reporter: kzar, Assigned: rpl)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached file firefox-option-problem.tar.gz (deleted) —
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36

Steps to reproduce:

1. Extract the attached archive, load as temporary extension.
2. Open a new browser tab, then open the developer tools for it.
3. In the developer tools switch to the "Option Problem" pane the extension created.
4. In that pane click the drop down menu and select one of the options.


Actual results:

The drop down menu does not expand, the options therein cannot be selected.


Expected results:

The drop down menu should expand and it should be possible to select the options.

Note: On Windows 10 the problem is reproducible, but on Linux (Debian Buster) it is not.
Related Adblock Plus issue: https://issues.adblockplus.org/ticket/5988
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Sorry I forgot to mention I'm using Firefox 57.0 on both Linux and Windows.
Possibly related to OOP.
Blocks: webext-oop
Component: WebExtensions: Untriaged → WebExtensions: Developer Tools
Priority: -- → P3
I can confirm that I can reproduce the bug on Linux as well by setting extensions.webextensions.remote to true and restarting Firefox.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Priority: P3 → P2
Attachment #8953999 - Flags: review?(mixedpuppy)
Comment on attachment 8953999 [details]
Bug 1417043 - Use webext-panels.xul for the WebExtensions devtools panels.

https://reviewboard.mozilla.org/r/223170/#review229400

::: browser/components/extensions/ext-devtools-panels.js:87
(Diff revision 1)
>      const {icon, title} = this.panelOptions;
>      const extensionName = this.context.extension.name;
>  
>      this.toolbox.addAdditionalTool({
>        id: this.id,
> -      url: "about:blank",
> +      url: "chrome://browser/content/webext-panels.xul",

The devtools panel modules currently manages the creation and removal of the browser XUL element where the actual extension url is loaded, the reasons are that:

- it associates the toolbox to the extension contexts related to the devtools panel (one for the top level frame, and eventually more there are other extension urls loaded in sub-frames of the devtools panel)

- it removes and re-creates the browser XUL element when the toolbox dock mode is changing (e.g. when the user ask the toolbox to undock or dock itself on the side), otherwise the toolbox breaks because of a swapFrameLoader exception (See Bug 1075490)

Nevertheless webext-panels.xul already provides a XUL page which contains what we need to support the autocompletion and the select dropdown in oop mode, and so it would be nice to reuse the webext-panels.xul also for the devtools panel (and in a follow up we could look into refactor this module and the webext-panels.xul/webext-panels.js further so that we can share more between the sidebar and the devtools panel, as well as for the devtools sidebar page once supported, which is tracked by Bug 1398734).
Comment on attachment 8953999 [details]
Bug 1417043 - Use webext-panels.xul for the WebExtensions devtools panels.

https://reviewboard.mozilla.org/r/223172/#review229588

::: browser/components/extensions/ext-devtools-panels.js:219
(Diff revision 1)
>      const {toolbox} = this;
>      const {extension} = this.context;
>      const {url} = this.panelOptions;
>      const {document} = window;
>  
> +    let stack = document.getElementById("webext-panels-stack");

Can you add a comment w/Bug # about the refactoring here.  I'd prefer to see this call getBrowser (in webext-panel.js) then make any additional necessary changes.   I suppose that could happen in the refactoring followup.

::: browser/components/extensions/ext-devtools-panels.js:240
(Diff revision 1)
> +
>      browser.setAttribute("flex", "1");
>  
>      // Ensure that the devtools panel browser is going to run in the same
>      // process of the other extension pages from the same addon.
>      browser.sameProcessAsFrameLoader = extension.groupFrameLoader;

I think this may be reasonable to add to webext-panels.js
Attachment #8953999 - Flags: review?(mixedpuppy) → review+
Comment on attachment 8953999 [details]
Bug 1417043 - Use webext-panels.xul for the WebExtensions devtools panels.

https://reviewboard.mozilla.org/r/223172/#review229588

> Can you add a comment w/Bug # about the refactoring here.  I'd prefer to see this call getBrowser (in webext-panel.js) then make any additional necessary changes.   I suppose that could happen in the refactoring followup.

Sure.

I filed the two followups (Bug 1442601, related to the additional refactoring, and Bug 1442604, related to add the additional tests) and added two inline comments that reference the related bugzilla issue.

> I think this may be reasonable to add to webext-panels.js

I agree, I filed this as a follow up tracked by Bug 1442606.
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/eeedadb5ca26
Use webext-panels.xul for the WebExtensions devtools panels. r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/eeedadb5ca26
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Attached image Bug1417043.gif (deleted) —
I can  reproduce the issue on Firefox 58.0.2 (20180206200532) under Win 7 64-bit, Win 10 64-bit and Mac OS X 10.13.2 with the extension from the Description.

The drop-down menu is not expanding.

This issue is verified as fixed on Firefox 60.0a1 (20180304220118) under Win 7 64-bit, Win 10 64-bit and Mac OS X 10.13.2

Please see the attached video.
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: