Open Bug 1906433 Opened 10 months ago Updated 2 months ago

XUL popup destroyed without "popuphidden" event when parent element changes styles

Categories

(Core :: XUL, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: maltejur, Unassigned)

References

()

Details

Attachments

(1 obsolete file)

This is something that came up in a custom userChrome theme here. There, a web extension is controlling some global styles. When the user interacts with a checkbox in a extension popup, the position attribute of #nav-bar is set to fixed (among other things). This results in the XUL popup being "destroyed", but the javascript chrome code still thinking the popup is open, and thus breaking the extensions toolbar button.

While investigating this bug, this comment caught my eye:

XXX: Currently we don't fire popuphidden for these popups, that seems wrong but alas, also pre-existing.

And this indeed seems to be related to the problem. Since I am not at all familiar with the XUL code, I am not sure if I have understood the problem completely. But I have written a small generic testcase reproducing this problem, and a very simple patch for also sending the popuphidden event when landing in this code path (which fixes the original bug with the userChrome theme). I will attach both.

Assignee: nobody → maltejur
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

The severity field is not set for this bug.
:enndeakin, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(enndeakin)
Severity: -- → S3
Type: defect → enhancement
Flags: needinfo?(enndeakin)
Priority: -- → P3
Assignee: maltejur → nobody
Status: ASSIGNED → NEW
Attachment #9411371 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: