Closed Bug 393953 Opened 17 years ago Closed 17 years ago

xul-overlay-merged notification fires before overlay has been merged

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 392515

People

(Reporter: myk, Unassigned)

Details

Under certain circumstances, the observer passed to document.loadOverlay will be sent a xul-overlay-merged notification before the overlay has finished loading (specifically, before attributes have been attached to an overlaid element).

I noticed this with patch v9 in bug 377784.  That patch adds an Applications prefpane to Firefox's Preferences dialog.  When you open the dialog and click the icon representing the prefpane, the prefpane doesn't get initialized.

Debugging traced the problem to the xul-overlay-merged notification.  The observer in preferences.xml receives that notification, but when it looks for an "onpaneload" attribute on the "paneApplications" prefpane element, which gets overlaid with an element in applications.xul, that attribute is not present.

If you close and then reopen the Preferences dialog, however, everything works correctly, and it continues to work for the duration of your browsing session.

Through some experimentation, I discovered that removing the CSS processing instruction or script tag in applications.xul made the problem go away.  So I'm working around the problem in my patch for bug 377784 by moving the CSS include to the outer preferences.xul file.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.