Closed
Bug 393055
Opened 18 years ago
Closed 18 years ago
Calling document.close() inside of a dynamically created iframe, causes throbber to never stop.
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: x, Unassigned)
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
If you dynamically create an iframe ... and inside of that iframe you do a document.write() of some content, and then call document.close() ...
Then the throbber will never stop ... and onLoad will never fire.
Reproducible: Always
Steps to Reproduce:
Use the following HTML/JS ...
1. Use it as is ... note that the page loads instantly and the throbber stops.
2. Uncomment out the line with document.close() and load it again. Now the throbber spins forever.
Code:
<html>
<head><title>Test</title></head>
<body id="test" leftmargin="0" topmargin="0">
<div name="testDIV" id="testDIV" style="border: 1px solid red; "></div>
<script type="text/javascript">
var ifrm = document.createElement("IFRAME");
var elm = document.getElementById("testDIV");
elm.insertBefore(ifrm, elm.firstChild);
ifrm.contentDocument.write(
'<html><head><title>Advertisement</title></head>' +
'<body id="bob" leftmargin="0" topmargin="0">' +
'<scr' + 'ipt type="text/javascript">' +
' document.write("Hello. There is document.close in this script");' +
// ' document.close();' +
'</scr'+'ipt>' +
'</body></html>'
);
ifrm.contentDocument.close();
</script>
</body></html>
Actual Results:
Throbber spins forever.
Expected Results:
Throbber should have stopped.
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
Comment 3•18 years ago
|
||
I see the problem with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.7pre) Gecko/2007081203 BonEcho/2.0.0.7pre but not with Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a8pre) Gecko/2007082103 Minefield/3.0a8pre ID:2007082103
Reporter, can you please test with a trunk build and confirm that both testcases work fine?
- http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
Keywords: testcase
Version: unspecified → 2.0 Branch
Comment 4•18 years ago
|
||
I see the same behavior as steve with Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9a8pre) Gecko/2007082105 Minefield/3.0a8pre
Confirmed ... using Minefield both cases appear to work fine ... When is FireFox 3 planned for release? and/or can this fix (whatever it was) be applied to FF2 at some point in the near future?
Comment 6•18 years ago
|
||
It won't be fixed in Firefox 2, Firefox 3 should be out Q4 2007.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•