Last modified: 2014-11-13 12:56:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74790, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72790 - VisualEditor: Tables - multiple colspan and rowspan are not displayed correctly
VisualEditor: Tables - multiple colspan and rowspan are not displayed correctly
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: Low minor
: ---
Assigned To: Editing team bugs – take if you're interested!
:
: 72784 (view as bug list)
Depends on:
Blocks: ve-tablesupport
  Show dependency treegraph
 
Reported: 2014-10-30 21:32 UTC by etonkovidova
Modified: 2014-11-13 12:56 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Correct table display - Edit mode (12.12 KB, image/png)
2014-10-30 21:32 UTC, etonkovidova
Details
Saved table with multiple colspan and rowspan (11.59 KB, image/png)
2014-10-30 21:37 UTC, etonkovidova
Details

Description etonkovidova 2014-10-30 21:32:20 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.
Comment 1 etonkovidova 2014-10-30 21:37:54 UTC
Created attachment 16968 [details]
Saved table with multiple colspan and rowspan
Comment 2 James Forrester 2014-11-03 23:20:43 UTC
Looks like an HTMLTidy change to the DOM?
Comment 3 etonkovidova 2014-11-04 23:00:15 UTC
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" |
|-
|}
Comment 4 Ed Sanders 2014-11-05 16:30:33 UTC
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.
Comment 5 Ed Sanders 2014-11-05 16:45:15 UTC
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
Comment 6 James Forrester 2014-11-13 12:56:59 UTC
*** Bug 72784 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links