Deleting a colspan column breaks the table layout failing to adjust the rowspan (also leaving an extra empty row)
Open, Stalled, Needs TriagePublic

Description

@C933103 provided a very good minimal testing set for this bug. Start with a table like this:

{| class="wikitable"
|-
! rowspan=2|ColA
! colspan=2|ColB
|-
!ColB1
!ColB2
|-
|Field1
|Field2
|Field3
|}

Now open the page in VisualEditor and remove all columns except the first ("ColB", including ColB1 and ColB2). (EDIT: to clarify, view the sample table in VE, click on the cell "ColB", click on the menu triangle above the column, click "Delete Columns". --Jaufrecht)

The display in the visual editor is exactly what you expect:

ColA
Field1

However, the actual result upon saving is:

{| class="wikitable"
|-
! rowspan=2|ColA
|-

|-
|Field1
|}

This actual result upon saving looks like this:

ColAField1

The expected result displays differently:

{| class="wikitable"
|-
!ColA
|-
|Field1
|}

[Note further that, after saved, the table continues to render differently in VE vs Read. In VE, it has two rows and one column; in Read, it has one row and two columns. --Jaufrecht]

See examples at https://zh.wikipedia.org/w/index.php?diff=38947510&oldid=38607870 and https://en.wikipedia.org/w/index.php?diff=703143357&oldid=703143009

Whatamidoing-WMF updated the task description. (Show Details)
Whatamidoing-WMF raised the priority of this task from to Needs Triage.
Restricted Application added a project: VisualEditor. · View Herald TranscriptFeb 3 2016, 7:45 PM
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript

This looks like a VE issue to me. Parsoid won't add the rowspan=2 attribute unilaterally -- it just reproduces it from the HTML it receives from VE.

I can't reproduce. The display I get in the visual editor is:

ColA
Field1
Jdforrester-WMF changed the task status from Open to Stalled.Feb 9 2016, 8:17 PM
Jdforrester-WMF set Security to None.
JAufrecht updated the task description. (Show Details)Feb 9 2016, 8:24 PM
Arlolra moved this task from Backlog to Non-Parsoid Tasks on the Parsoid board.Apr 12 2016, 11:31 PM
ferveo added a subscriber: ferveo.Jun 2 2016, 1:07 PM

To extend on this, the issue is related to how VE displays tables. If you have:

{| class="wikitable"
|-
!rowspan=2|A
|-
|B
|}

i.e.:

<tr>
  <th rowspan="2">A</th>
</tr>
<tr>
  <td>B</td>
</tr>

any browser would show this in a single row (since rowspan takes precedent). However VE renders this in 2 rows/single column formation.