Closed
Bug 508537
Opened 15 years ago
Closed 14 years ago
using JS appendChild to move elements containing iFrames causes display issues when navigating back
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: mdb.uk, Unassigned)
References
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.21022; .NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.21022; .NET CLR 3.5.30729) When using appendChild to move two or more elements which contain iFrames to an alternative parent element, the behaviour is as expected. i.e: document.getElementById("myDiv1").appendChild(document.getElementById("divWithIFrame1")); document.getElementById("myDiv2").appendChild(document.getElementById("divWithIFrame2")); However, if we navigate to a different page or site, and then click the browser back button you will see that one of the iFrames has been copied to all the elements. Reproducible: Always Steps to Reproduce: 1. Save the Additional Info as a test.htm file. 2. Open the test.htm and click the link to navigate to a different page 3. Click back. You will see the issue. Actual Results: Page not correctly re-drawn when clicking back. Expected Results: The iFrames should be persistant. <html> <head> <script> function appendchildren() { document.getElementById("target1").appendChild(document.getElementById("content1")); document.getElementById("target2").appendChild(document.getElementById("content2")); } </script> </head> <body> <p>This example demonstrates a suspected appendChild bug in mozilla FireFox.</p> <p>When using appendChild to move two or more elements which contain iFrames to an alternative parent element, the behaviour is as expected.<br><br> However, if we navigate away to a different page or site, and then click the browser back button you will see that one of the iFrames has been copied to all the elements.</p> <div id="target1"></div> <div id="target2"></div> <div id="content1"> <iframe src="http://www.google.com" width="50%" height="200"></iframe> </div> <div id="content2"> <iframe src="http://www.yahoo.com" width="50%" height="200"></iframe> </div> <a href="http://www.google.com">Follow this external link, then click the browser Back button</a> </body> <script>appendchildren();</script> </html>
Comment 2•15 years ago
|
||
Comment 3•15 years ago
|
||
This is probably a dupe of one of the bugs that depend on bug 462076. I'll just mark this as a dependency for now.
Depends on: 462076
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 4•15 years ago
|
||
This is not a dup of bug 462076, but will be fixed by the patch I'm about to upload there soon.
Comment 5•14 years ago
|
||
Can reproduce on trunk, but easily on 3.6. Marking this fixed (by bug 462076). Please reopen if you can still see this on trunk.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•