User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 When creating a table using DOM, the first COL tag applies to the second column, the second COL tag to the third column, etc. Hardcoding the HTML in a second table yields exactly the same HTML code as the first, but the COL tags are applied correctly to their corresponding columns. The attached file demonstrates this (select text between the two tables, and VIEW SELECTION SOURCE to see the rendered code). This bug is present on 1.4 windows and linux, and 1.5 linux. I haven't tested any other versions. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Attachment #129878 - Attachment mime type: text/plain → text/html
Confirming wXP 2003-08-08-04
Status: UNCONFIRMED → NEW
Ever confirmed: true
Workaround for this bug: Generate the colgroup object, then set the table object's innerHTML to the colgroup's innerHTML. After that, append thead, tbody objects. Doing it this way seems to render correctly.
The trick seems to be adding the COL elements directly to the TABLE. If the COLs are inside a COLGROUP then this bug appear in mozilla. No innerHTML trick/adding THEAD required. However the reverse seems to be true for IE. The attached file demonstrates this.
Created attachment 175957 [details] demo of what works in mozilla/IE, and the static case that works in both
Testcases work for me in current trunk build. I can see the bug in Mozilla1.7 So this is WFM, not?
Assignee: general → nobody
Component: DOM: HTML → Layout: Tables
QA Contact: ian → layout.tables
The testcases looks fine to me on trunk too.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.