Bug 13474

Summary: Can't use javascript to close window following iframe post
Product: WebKit Reporter: James Berry <james>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Critical CC: tvignaud
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Page that demonstrates the bug. none

Description James Berry 2007-04-24 17:29:45 PDT
Normally, one can use javascript to close a window as long as the window was opened by following a link. But in Safari (and all WebKit versions to date) this fails after a get or post operation that targets an iframe within the window.

Note that this is an important operation, as it would be used in an image upload window, for instance, where the post through the hidden iframe is used to submit an image.

This same operation succeeds in FireFox, IE6, and IE7.

Attached is a simple html file page that will allow you to reproduce the issue.
Comment 1 James Berry 2007-04-24 17:31:07 PDT
Created attachment 14162 [details]
Page that demonstrates the bug.
Comment 2 James Berry 2007-04-24 17:32:36 PDT
If you there is a workaround for this bug, I'd love to hear about it.
Comment 3 James Berry 2008-02-25 09:52:32 PST
I can no longer replicate this bug, and presume it to be fixed.
Comment 4 Thierry Vignaud 2009-10-14 07:20:21 PDT
Still valid as of webkit-1.1.15.1 (as tested with midori-0.1.10 or the perl Gtk2-WebKit binding).
Probably related to bug #16401