Closed Bug 311042 Opened 20 years ago Closed 20 years ago

Inner tags lost from innerHTML on off-screen TR

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 277407

People

(Reporter: md2perpe, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4 In the following document, the td-tags in the innerHTML are lost, so the words are shown without any space between them. If you mark the text shown on the webpage, right-click and select Show Selection Source, you will see that the tags are not in the DOM-tree. BTW, there seems to be similar problems in Internet Explorer. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1"> <title>TR.innerHTML-test</title> <script type="text/javascript"> function init() { var row = document.getElementById('r'); row.removeAttribute('id'); var tbody = document.getElementById('b'); var r = row.cloneNode(true); r.innerHTML = '<td>New</td><td>content</td><td>looses</td><td>the cells</td>'; tbody.appendChild(r); } </script> <style type="text/css"> th { width: 4cm; text-align: left; } </style> <body onload="init()"> <table> <thead> <tr> <th>Ord 1</th> <th>Ord 2</th> <th>Ord 3</th> <th>Ord 4</th> </tr> </thead> <tbody id="b"> <tr id="r"> <td>Original</td> <td>content</td> <td>with</td> <td>cells</td> </tr> </tbody> </table> </body> Reproducible: Always
Duplicate of bug 277407. *** This bug has been marked as a duplicate of 277407 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.