window.close cancels file download




11 years ago
8 years ago


(Reporter: Jörg Ahrens, Unassigned)


2.0 Branch

Firefox Tracking Flags

(Not tracked)




11 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061208 Firefox/
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061208 Firefox/

consider a form with input type=button onClick=doSubmit(this.form)
and doSubmit does
    setTimeout('window.close()', 5000);
The resulting request has some download mime type like application/octet-stream
A "save file" dialog will open.
If the user does nothing for 5 seconds, the request window will close and the "save file" dialog will stay open but no file will be downloaded if the user chooses a place to store this file after the request window has closed.
This did work on Firefox 1.5 (latest):
the request window stays open until the file is saved on disk. 

Reproducible: Always

Steps to Reproduce:
construct a form with javascript submit like described above and wait until the window closes.
Actual Results:  
File can't be saved after request window is closed.

Expected Results:  
File can be saved (window close is delayed until file is saved) (like Firefox 1.5 did it)

Comment 1

11 years ago
In 2004 there was a similar bug: 262446


11 years ago
Version: unspecified → 2.0 Branch
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
No reply, INCOMPLETE. Please retest with Firefox 3.6.3 or later and a new profile ( If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Last Resolved: 8 years ago
Resolution: --- → INCOMPLETE

Comment 4

8 years ago
Came across situation described with bug 262446. This issue was reported on Windows environment.

It seems that download gives problem when parent window is closed. After reading this comment tested issue on FF 3.6.3. But it does not work when run on Windows XP.
You need to log in before you can comment on or make changes to this bug.