Closed
Bug 4167
Opened 26 years ago
Closed 23 years ago
window.open during unload event fails when closing last window
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P2)
Tracking
()
RESOLVED
WORKSFORME
Future
People
(Reporter: desale, Assigned: joki)
Details
(Keywords: testcase, Whiteboard: [PDT-][TESTCASE] fix in hand, waiting on review from travis)
onUnload Event Does Not Work.
Providing information to simulate the problem.
Product: Seamonkey.[apprunner as well as viewer]
Build Date: 03/22/99
Platform: PC [Windows-95]
Steps to Reproduce:
1] Please copy the code I'm providing. Save as HTML file.
2] Open this HTML file in apprunner as well as viewer.
3] Then try close the window.
Expected Results: After closing window browser should open another window
pointed to URL http://www.yahoo.com
Actual Results: Browser does not open another window.
Code:
<HTML>
<HEAD><TITLE>Unload Event</TITLE></HEAD>
<BODY onUnload="window.open('http://www.yahoo.com')">
<H4>This Page will test whether Unload event works or not.<Br>
After closing this window, browser should open another window<br>
which is pointed to http://www.yahoo.com<H4>
</BODY>
</HTML>
Reporter | ||
Updated•26 years ago
|
Priority: P3 → P2
Target Milestone: M3
Reporter | ||
Comment 1•26 years ago
|
||
Target is M3 per request.
Reporter | ||
Updated•26 years ago
|
QA Contact: 3847 → 4616
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 2•26 years ago
|
||
Checked in 3/29. Should be in next days builds.
Reporter | ||
Comment 3•26 years ago
|
||
Right now Window.open is not working and alert is also not working, so I'm
trying to find out some way to test onUnload event. I need to find out
way to test onUnload event without alert or opening new window. So once I find
that I'll be able to test onUnload event. till then I'm leaving this bug as
marked Fixed.
Assignee | ||
Comment 4•26 years ago
|
||
onUnload should fire any time a document is going away, event just for
switching pages.
Reporter | ||
Updated•26 years ago
|
Status: RESOLVED → REOPENED
Reporter | ||
Comment 5•26 years ago
|
||
This bug is still there. Now window.open() method is working so we can test
whether onUnload event works or not. Please again follow the procedures provided
initially. This bug is still there.
Assignee | ||
Updated•26 years ago
|
Status: REOPENED → ASSIGNED
Target Milestone: M6 → M7
Assignee | ||
Comment 7•26 years ago
|
||
Well it now sort of works. The unload will fire but some pieces of the
document/webshell are already gone. For example in this case, the webshell
being unloaded is still intact but its parent is already gone (or at least
already null). Will have to work more on this.
Assignee | ||
Updated•26 years ago
|
Target Milestone: M7 → M10
Assignee | ||
Comment 8•26 years ago
|
||
Unless someone comes up with a blocker based on how this currently works I'll
fix it later.
Updated•26 years ago
|
Whiteboard: [TESTCASE] New testcase shows bug in M8-1999070808
Comment 9•26 years ago
|
||
TEST ENVIRONMENT:
Win95, M8-1999070808
The original testcase bundled with this big did not even work properly in
Communicator 4.5
The expected result was that the browser window would close and a new window
would open, fired by the onUnload event. This was not the result that I saw in
communicator. The browser closed without any side-effects.
I wrote another test that does not rely on the window closing, but only the
document unLoading to load a new document in the browser.
Expected results:
The OnUnload event should fire an alert dialog box when a link is clicked to
load a new page. (This is the result that is seen when the page is tested in
Communicator 4.5)
Actual Result:
No alert box is produced.
-------------TestCase-----------------
<HTML>
<HEAD>
<TITLE>Unload Event</TITLE>
</HEAD>
<BODY onUnload="alert('Unload has fired.');">
When the yahoo link is clicked, the document <BR>will 'unload' and an alert
should display.<P>
<A HREF="http://www.yahoo.com">yahoo link</A>.
</BODY>
</HTML>
---------------------------
Reporter | ||
Comment 10•26 years ago
|
||
The reason I wrote that testcase like that is because alert() is not working
yet. alert() method itself is not properly implemented yet. And the testcase I
wrote eirlier is working fine on communicator 4.5.
Getting output with alert is the most simple and convenient way, but since its
not working then I have to findout some other ways to get output right ? thats
why I used that thing to open new window and load it with www.yahoo.com.
I tested my testcase again and its working fine for me.
And if I call window.open() on Unload, then it must open new window on closing
the parent window.
Updated•25 years ago
|
Target Milestone: M10 → M11
Comment 11•25 years ago
|
||
m11. let me know if something is close on this one.
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 25 years ago
Resolution: --- → WORKSFORME
Comment 12•25 years ago
|
||
Just tested on MacOS, works for me!
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Reporter | ||
Comment 13•25 years ago
|
||
I just tested this one with todays bulds [09-27-09] as well as with [09-23-09]
builds.
It works with viewer, but it does not work with apprunner.
Reopening bug.
I tested on windows-95.
Reporter | ||
Updated•25 years ago
|
Resolution: WORKSFORME → ---
Comment 14•25 years ago
|
||
The successful MacOS test was with apprunner
Reporter | ||
Comment 15•25 years ago
|
||
Its not working with Windows-95. I tested again.
Updated•25 years ago
|
Status: REOPENED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 16•25 years ago
|
||
I tested today's apprunner/mozilla on Windows NT. It works for me. Resolving as
fixed.
Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Summary: onUnload Event Does Not Work. → onUnload Event is not firing on closing the window.
Reporter | ||
Updated•25 years ago
|
Resolution: FIXED → ---
Reporter | ||
Comment 17•25 years ago
|
||
Yead onUnload event is working fine if we load another page and try to catch
unload event. But if we try to catch unload event on closing window then, we can
see that unload event is not firing.
We have two testcases in this bug report. One is with alert which fires on
cliking the link. [This testcase works fine coz we are not closing window here]
If we try first testcase and follow steps I provided to reproduce then you'll
see that its not working.
This is pretty important because lot of websites use this event to open another
window on closing main window of the site.
Please try to reproduce it with first testcase that I provided while filing bug.
Re-opening the bug since its not working correctly on closing window.
Reporter | ||
Comment 18•25 years ago
|
||
Changed summary, and clearing resolution.
Updated•25 years ago
|
Target Milestone: M11 → M12
Comment 19•25 years ago
|
||
m12
Comment 20•25 years ago
|
||
Moving to m13 because Joki seems to be distracted.
Assignee | ||
Updated•25 years ago
|
Target Milestone: M13 → M14
Comment 21•25 years ago
|
||
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
Assignee | ||
Updated•25 years ago
|
Status: REOPENED → ASSIGNED
Whiteboard: [TESTCASE] New testcase shows bug in M8-1999070808 → [TESTCASE] fix in hand, waiting on review from travis
Comment 22•25 years ago
|
||
We'd like to see this fixed for beta, but we'd ship without it.
Whiteboard: [TESTCASE] fix in hand, waiting on review from travis → [PDT-][TESTCASE] fix in hand, waiting on review from travis
Assignee | ||
Comment 23•25 years ago
|
||
Okay, so this is 90% fixed. The unload event now fires and some things work.
Like an alert on unload is fine. However, when opening a new window we seem to
have a race condition if the window closed is the last browser window open at
the time. Sometimes app data has already gone. If other windows are open this
works fine.
Updating summary and moving out to further milestone.
Summary: onUnload Event is not firing on closing the window. → window.open during unload event fails when closing last window
Target Milestone: M14 → M16
Assignee | ||
Comment 24•25 years ago
|
||
Bulk prioritizing bugs for correct milestones.
Target Milestone: M16 → M18
Assignee | ||
Comment 25•25 years ago
|
||
This bug has been marked "future" because the original netscape engineer working
on this is over-burdened. If you feel this is an error, that you or another
known resource will be working on this bug,or if it blocks your work in some way
-- please attach your concern to the bug for reconsideration.
Target Milestone: M18 → Future
Updated•24 years ago
|
Comment 26•23 years ago
|
||
WFM with 2001091618
Reporter | ||
Comment 27•23 years ago
|
||
This seems working fine to me now.
Comment 28•23 years ago
|
||
marking worksforme.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 23 years ago
Resolution: --- → WORKSFORME
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
•