Closed Bug 1864957 Opened 2 years ago Closed 2 years ago

Remove the extra <panel> from Report Broken Panel's xhtml

Categories

(Firefox :: General, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox121 --- disabled
firefox122 --- fixed

People

(Reporter: twisniewski, Assigned: twisniewski)

References

Details

Attachments

(1 file)

Report Broken Site has an extra <panel> in reportBrokenSitePanel.inc.xhtml:

<panel id="report-broken-main-menu-panel"
       class="cui-widget-panel panel-no-padding">
  <panelmultiview mainViewId="report-broken-site-popup-mainView"/>
</panel>

This shouldn't be needed, we should be able to use this code to show the popup from the Help menu:

ownerGlobal.PanelUI.showSubView(
  ReportBrokenSite.MAIN_PANELVIEW_ID,
  ownerGlobal.PanelUI.menuButton
);

But the panel popup that is called up when using the above code will dismissed the popup if the user selects a drop-down item while using it (for instance, the optional reason drop-down on the Report Broken Site popup, which is implemented as a <menulist>). I've found that using this extra panel with this code instead prevents that:

        ownerGlobal.PanelMultiView.openPopup(
          document.getElementById("report-broken-main-menu-panel"),
          document.getElementById("PanelUI-menu-button"),
          { position: "bottomright topright" }
        );

But we shouldn't really need to do that instead of using the showSubView method. Gijs suspects the popup dismissal may be caused by the isOnInteractiveElement check here:
https://searchfox.org/mozilla-central/rev/7e60ac48dc5b3e3f06c1baf2a9a6e0352bd85c01/browser/components/customizableui/CustomizableUI.sys.mjs#2305

It doesn't look like it is that JS code but I've not yet had a chance to work out what is closing the panel in this case.

Flags: needinfo?(gijskruitbosch+bugs)
Depends on: 1866503

I put up a patch in bug 1866503 that fixes the blocking issue here.

Flags: needinfo?(gijskruitbosch+bugs)
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Blocks: 1869574
Pushed by twisniewski@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b32f0b0041b8 remove the extra <panel> Report Broken Site was using as a work-around for bug 1866503; r=Gijs,desktop-theme-reviewers,dao
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: