Closed Bug 1866503 Opened 1 year ago Closed 1 year ago

PanelUI's temporary panel code closes panels when menulists inside those panels close

Categories

(Firefox :: Toolbars and Customization, defect)

Desktop
All
defect

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox122 --- fixed

People

(Reporter: Gijs, Assigned: Gijs)

References

Details

Attachments

(1 file)

Turns out you can churn out close to 100 versions of Firefox with the same bug in them? At least, I'm fairly sure this has worked this way since Australis, back in 28/29 or thereabouts. :-)

Anyway, once you hit it it's reasonably straightforward to understand what's going on:

  1. when you open a panelview individually with PanelUI (the history, library, synced tabs and various other views allow doing this via their dedicated toolbar buttons, and we do it for add-ons!), we create a temporary panel and panelmultiview, all dedicated to that subview.
  2. This event listener code is in charge of tidying up temporary panels when they are hidden.
  3. menulists are also popups, like panels
  4. when menulists close, they fire popuphiding/popuphidden events, just like panels
  5. so when your panelview has a menulist that closes, they hit the popuphidden event listener.
  6. the popuphidden event listener is attached to the right panel but otherwise doesn't care where the popuphidden event has come from - including menus and other stuff inside that panel itself.

(5) is where the bug is, and that closes the containing panel when the user selects an item in the menulist, which is bad. We should fix it!

Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/49b89e35b5f5 closing menupopups/panels inside panelviews in temporary PanelUI panels should not close those panels, r=emilio
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/7c7a7ff17005 Remove almost-surely accidentally added debugging code.
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/fd41e77c123e closing menupopups/panels inside panelviews in temporary PanelUI panels should not close those panels, r=emilio
Status: NEW → RESOLVED
Closed: 1 year 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

Creator:
Created:
Updated:
Size: