Closed
Bug 6354
Opened 26 years ago
Closed 26 years ago
[BLOCK] onunload doesn't fire when a window is closed
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: hyatt, Assigned: joki)
Details
When a window is closed, the onunload handlers in the documents don't fire.
We're depending on this to do some cleanup and releasing of stuff.
I'm not actually sure if this is the correct behavior or not, but I'm hoping
that it is.
Below is a simple test case.
<html>
<body onunload="dump('HI');">
<a href="http://www.mozillazine.org/">MOZILLAZINE!</a>
</body>
</html>
If you switch to the MOZILLAZINE page, you'll see the onunload handler fire.
If, however, you just close the window (instead of following the link), the
onunload handler won't fire.
This is a blocker.
Updated•26 years ago
|
Assignee: nisheeth → joki
Comment 1•26 years ago
|
||
Re-assigning this to Tom Pixley, the events guru.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 2•26 years ago
|
||
Well this is at least partially fixed. Before a webshell is destroyed it now
fires an unload event. I can maybe see a potential problem with being able to
access of the content in sibling/parent webshells during the unload since we
don't have a single spot to fire this event from before any destruction occurs
but we'll address those bugs as and if we come to them.
Comment 3•26 years ago
|
||
it seems a window receive onunload when a child frame is unloaded. You can see the problem with the message
compose window when we reload a new url into the editor frame. In my understanding, a window should only receive
an onunload message when it goes away and not when one of its child goes away right?
Assignee | ||
Comment 4•26 years ago
|
||
Yes, that's true, it's a known bug, and it's a separate one from this one.
Comment 5•26 years ago
|
||
Bug number for that other bug?
Assignee | ||
Comment 6•26 years ago
|
||
Don't know. Talked to rpotts about it a while back. He was working on
document loading notification changes so any fix was waiting on those.
Comment 7•26 years ago
|
||
I filed bug 6365 to track the incorrect onunload handling. joki, if rpotts is
unable to get to this in the near future, please find a new owner for this
problem; it's a serious blocker for much of the appcores work.
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → REOPENED
Reporter | ||
Comment 8•26 years ago
|
||
I don't see how this bug could be marked as fixed. Run the test case in
viewer. The onunload handler doesn't fire at all when you close up the
window. You're either not firing the event, or you're leaking the webshell.
In either case, this certainly isn't resolved.
This has nothing to do with apprunner. HTML pages in viewer don't have their
onunload handlers fired when you close up the viewer window. Reopening the bug.
Assignee | ||
Updated•26 years ago
|
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Reporter | ||
Comment 9•26 years ago
|
||
D'oh! Never mind. I have been schooled.
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•