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

RESOLVED FIXED

Status

Thunderbird
Mail Window Front End
RESOLVED FIXED
10 years ago
2 years ago

People

(Reporter: Patrick Brunschwig, Unassigned)

Tracking

PowerPC
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [jm-ex])

(Reporter)

Description

10 years ago
Found on TB version 2.0.0.0 (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,

document.getElementById("messagepane")

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...

Comment 1

10 years ago
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.

Updated

10 years ago
Whiteboard: [jm-ex]

Updated

9 years ago
Assignee: mscott → nobody
Patrick, still an issue?
Flags: needinfo?(patrick)
(Reporter)

Comment 4

2 years ago
No, this must have been fixed years ago...
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Reporter)

Updated

2 years ago
Flags: needinfo?(patrick)
You need to log in before you can comment on or make changes to this bug.