Bug 28206 - onbeforeunload not called at window close + frame or iframe focused
Summary: onbeforeunload not called at window close + frame or iframe focused
Status: RESOLVED DUPLICATE of bug 27481
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2009-08-11 18:18 PDT by jasneet
Modified: 2009-08-11 22:16 PDT (History)
1 user (show)

See Also:


Attachments
testcase (441 bytes, text/html)
2009-08-11 18:18 PDT, jasneet
no flags Details
testcase (405 bytes, text/html)
2009-08-11 18:19 PDT, jasneet
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jasneet 2009-08-11 18:18:51 PDT
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
Comment 1 jasneet 2009-08-11 18:19:21 PDT
Created attachment 34629 [details]
testcase
Comment 2 Alexey Proskuryakov 2009-08-11 22:16:09 PDT

*** This bug has been marked as a duplicate of bug 27481 ***