Page MenuHomePhabricator

VisualEditor omits linebreak when deleting table row containing a cell with rowspan, breaking the table
Open, Needs TriagePublic

Description

As reported on the German-language Wikipedia's feedback page, the VisualEditor breaks the table layout if a row is removed from a table where a column spans several rows via rowspan.

Take the following example (test page):

{| class="wikitable"
! rowspan="3" |Big span
| rowspan="3" |Big span
|{{Version |p |60.5}} Smallest
|-
|{{Version |p |60.6}} Smaller
|-
|{{Version |p |60.7}} Small
|}

This results in a table like this:

grafik.png (185×442 px, 9 KB)

Now, use the VisualEditor to remove the first row (diff) and publish changes. The result is the following source code

{| class="wikitable"
|-
! rowspan="2" |Big span
| rowspan="2" |Big span|{{Version|p|60.6}} Smaller
|-
|{{Version |p |60.7}} Small
|}

which is rendered as

grafik.png (70×1 px, 17 KB)

The correct source code is (diff)

{| class="wikitable"
|-
! rowspan="2" |Big span
| rowspan="2" |Big span
|{{Version|p|60.6}} Smaller
|-
|{{Version |p |60.7}} Small
|}

which renders as

grafik.png (131×429 px, 7 KB)

Event Timeline