Bug 20152 - New window opened by onunload handler for last remaining window gets closed immediately
Summary: New window opened by onunload handler for last remaining window gets closed i...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-07-24 00:03 PDT by Thorsten Dencker
Modified: 2008-07-29 00:37 PDT (History)
6 users (show)

See Also:


Attachments
Sample aaplication showing the bug (1.51 KB, text/html)
2008-07-24 00:06 PDT, Thorsten Dencker
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Dencker 2008-07-24 00:03:35 PDT
Hello 

this bug is related "18341: window.onunload not fired when the last browser window is being closed"

We expected that the handler attached to "window.onunload" gets invoked anytime
when a document gets unloaded. This was solved in bug 18341. In the onunload handler we open a new extra window. This new window must stay open during the main window closes. All common browsers  (MSIE 5,6,7), (Firefox 2,3) even (Safari f. MacOs) behaves konsistently and guarantee that the window which was opened during onunload is stays on the screen even the main windows has been closed in a meantime. 

When using Safari for Windows (tested with Safari 4 Developer Preview, 526.12.2)
when CLOSING THE LAST BROWSER WINDOW, the Safari opens such new window but then closes it immediately along with the main window - yet before content of the extra window has fully loaded and processed.


Note:  Even the scenario may look strange for you - we use the 
window.onuload and the extra window to perform reasonable actions (to notify backend servers about to close backend sessions when the user left the browser), so it is not about just annoying popups/windows, but have strong real and valid usecase. I put the severity to Critical as it is almost a blocker for our applications / session handling.
Comment 1 Thorsten Dencker 2008-07-24 00:06:24 PDT
Created attachment 22460 [details]
Sample aaplication showing the bug

Start in Safari 4 on Windows and read the descriptionin the HTML file. Summary just close the window and a new window should be open and should stay open.
Comment 2 Mark Rowe (bdash) 2008-07-24 03:38:27 PDT
This sounds very much like a Safari bug rather than a WebKit bug.
Comment 3 Adam Roben (:aroben) 2008-07-24 07:56:58 PDT
(In reply to comment #2)
> This sounds very much like a Safari bug rather than a WebKit bug.

Agreed.

Comment 4 Mark Rowe (bdash) 2008-07-24 13:23:24 PDT
<rdar://problem/6100327>
Comment 5 Mark Rowe (bdash) 2008-07-24 13:24:23 PDT
As this is likely a Safari bug rather than a WebKit bug, it should be filed with Apple at <http://bugreport.apple.com/>.  This bug report should be closed as INVALID per our processes for handling non-WebKit bug reports in Bugzilla.
Comment 6 Robert Blaut 2008-07-29 00:37:00 PDT
(In reply to comment #5)
> As this is likely a Safari bug rather than a WebKit bug, it should be filed
> with Apple at <http://bugreport.apple.com/>.  This bug report should be closed
> as INVALID per our processes for handling non-WebKit bug reports in Bugzilla.
> 

Done.