Closed Bug 376610 Opened 13 years ago Closed 5 years ago

"load" event on Messenger Window fired twice (Mac OS X only)


(Thunderbird :: Mail Window Front End, defect)

Not set


(Not tracked)



(Reporter: patrick, Unassigned)


(Whiteboard: [jm-ex])

Found on TB version (20070326):

In Enigmail I have an overlay to mailWindowOverlay.xul. That overlay contains the following Javascript line (not in any specific function, i.e. directly executed after the JS is loaded).

window.addEventListener("load",   enigMessengerStartup, false);

Now I see in Mac OS X that enigMessengerStartup() is called twice when Thunderbird starts. And not only that it's called twice: when called for the first time it seems that some of the XUL elements are not yet there. Specifically,


returns NULL on the first call, but works OK on the 2nd call. Of course I can work around it easily, but it means that any extension listening to the window.load event will have to work around it as well...
hmm, I wonder if the hidden window is firing an onload event?
It certainly should, since it expects to disable menu items from its onload handler.

Do we want to have most of mailWindowOverlay.xul be message(s)WindowOverlay.xul? We certainly could, have just a stripped down mailWindowOverlay.xul that overlays every single window (gaining things like having DOMi work when the addressbook is frontmost), and put the message content stuff in a separate overlay that people only interested in mail could attach themselves to instead.
Whiteboard: [jm-ex]
Assignee: mscott → nobody
Patrick, still an issue?
Flags: needinfo?(patrick)
No, this must have been fixed years ago...
Closed: 5 years ago
Resolution: --- → FIXED
Flags: needinfo?(patrick)
You need to log in before you can comment on or make changes to this bug.