Created attachment 34628 [details] testcase I Steps: 1. open a page with a frameset or an iframe (attached files) 2. focus the frame 3. close the window II Issue: onbeforeunload is not executed. Related Webkit bugs https://bugs.webkit.org/show_bug.cgi?id=19418 as well as https://bugs.webkit.org/show_bug.cgi?id=21669 are about an onbeforeunload handler when it is assigned to the frame content or the iframe itself. This bug is about onbeforeonload assigned to a window which contain an iframe or a frameset. The handler is properly called if we back the document or if we load the document and immediately close the window. Yet if the contained frame or iframe is focused (using JS as in the attached reduction) when the window is closed then, the window beforeonload handler is not called. III Browsers info: Chrome 3.x : NOT OK Safari 3/Win: NOT OK Safari 3/Mac: OK Safari 4/Mac: OK Firefox 3.x: OK IE 8: OK Bug in Chromium : http://code.google.com/p/chromium/issues/detail?id=17157
Created attachment 34629 [details] testcase
*** This bug has been marked as a duplicate of bug 27481 ***