Last modified: 2014-11-13 12:56:59 UTC
Created attachment 16967 [details] Correct table display - Edit mode Steps to reproduce: 1. In VE insert a table and edit the table with mergining cells to get the following structure(or something similar) - look at the attached screenshot- colspan_rowspan_CORRECT_display: <table class="wikitable"> <tbody><tr> <th colspan="4" rowspan="2"></th> </tr> <tr> <th colspan="2" rowspan="2">Header 1</th> <th>Header 2</th> <td></td> </tr> - 2. save the table - the saved table format will be different - look at the attached screenshot - saved_table_with_multiple_colspan_rowspan Expected: the saved table format should be the same as in Edit mode.
Created attachment 16968 [details] Saved table with multiple colspan and rowspan
Looks like an HTMLTidy change to the DOM?
Basically a table's cells cannot be unmerged via Table menu when multiple merge actions have been applied. Applying un-merge action results in "TypeError: rowCells[col] is null" error. Another sample of a table that has not un-mergeable cells: {| class="wikitable" ! rowspan="2" colspan="2" | ! rowspan="2" colspan="2" | |- |}
I suspect that <table> <tr> <td colspan="2" rowspan="2">Foo</td> <td colspan="2" rowspan="2">Foo</td> </tr> </table> is bad HTML, as it asks you to span into a row that doesn't exist, in fact <table> <tr> <td colspan="2" rowspan="2">Foo</td> <td colspan="2" rowspan="2">Foo</td> </tr> <tr> <td colspan="4">Bar</td> </tr> </table> breaks the renderer in both Chrome and Firefox. An extra, empty, <tr> is required between the two. I'm putting that part down as wontfix, give that browsers don't even support it.
The first case (merging two whole rows together) exposes a bug in the PHP parser (although not Tidy, because I don't have that locally) whereby and empty row is discarded: {| class="wikitable" | colspan="4" rowspan="2" |foob |- |- ! colspan="2" rowspan="2" |bar !baz ! |- | |hee |- |quux | | | |- | |foo | | |} This wikitext renders fine in Parsoid though
*** Bug 72784 has been marked as a duplicate of this bug. ***