setting innerHTML on table elements does not work - by the_dees

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


ID 582525 Comments
Status Closed Workarounds
Type Bug Repros 5
Opened 8/2/2010 10:24:44 AM
Access Restriction Public

Description

Setting innerHTML on table, colgroup, thead, tfoot, tbody, and tr elements in HTML does not work.

This limitation is not present in other browsers, same markup failed.

Public testcase: http://the-dees.webs.com/iepp1/142-table-inner-html.html

This issue was previously reported as ID#336254 (Setting .innerHTML on a table element still fails in IE8B1, also throws error and halts page rendering).
Sign in to post a comment.
Posted by unique_username on 9/29/2010 at 9:58 AM
Hey woah! this item is now marked as Fixed?! - Is it fixed in an upcoming IE9 beta? because it most certainly is NOT FIXED in IE9 Beta 1.
Posted by the_dees on 9/25/2010 at 5:20 AM
I have filed a new rport for the remaining issue: ID#600942 (setting innerHTML on table elements does not work - Take 2).
Posted by kangax on 9/23/2010 at 7:12 AM
the_dees is right, innerHTML is still broken with tables in IE9 beta.

For example, a simple markup like this — `tableEl.innerHTML = '<tbody><tr><td>foo</td>bar<td></td></tr></tbody>'` does not create a <tr> element within <tbody> element, with 2 <td> children elements; instead, only <tbody> with "foobar" text node is created (as if markup of a given string is completely ignored and only text nodes are taken, in flattened manner).

Please reopen.
Posted by the_dees on 9/16/2010 at 8:37 AM
No, this issue is not resolved in Platform Preview #5 (Beta #1). There are a lot of bugs remaining.

If you did it right, there should be only one simply issue: If innerHTML is set on any table element, table related elements are dropped from innerHTML.

So if I set innerHTML = "<tr><td>Test Data</td></tr>", innerHTML actually sets only "Test Data", creating an incorrect DOM like "<tbody>Test Data</tbody>".

So innerHTML on table elements is still almost completely broken.
Posted by Microsoft on 9/16/2010 at 5:19 AM
Thank you for your feedback.

This issue was resolved in Internet Explorer 9 Beta and the Platform Preview Build released on 9/15/2010. Please verify the change and file a new feedback (or reactivate the existing one) if the problem persists.

Best regards,

The Internet Explorer Team
Posted by Microsoft on 8/22/2010 at 1:49 PM
Thank you for your feedback.

We were able to reproduce the issue and are investigating it.

Best regards,

The Internet Explorer Team
Posted by the_dees on 8/6/2010 at 7:55 AM
This issue is still present in Preview #4.