Page MenuHomePhabricator

Merging cells to 'delete' entire rows or columns causes errors
Closed, ResolvedPublic8 Estimated Story Points

Description

Environment- beta, test2

1> insert a table.By default it is 4x4.
2> Highlight only the content cells under the first two header and merge them. Do the same for the other two columns. It is now a 2 x 4 table.
3> Select the last header cell and insert after or click on the first header cell and insert before.
JS error “Uncaught TypeError: Cannot read property 'isPlaceholder' of null” appears.

Screenshot attached.

s.PNG (287×1 px, 17 KB)

Event Timeline

Swainr raised the priority of this task from to Needs Triage.
Swainr updated the task description. (Show Details)
Swainr added a project: VisualEditor.
Swainr subscribed.
Catrope set Security to None.
Esanders renamed this task from Ina 2 x 4 table, inserting column before/after gives JS error “Uncaught TypeError: Cannot read property 'isPlaceholder' of null” to In a 2 x 4 table, inserting column before/after gives JS error “Uncaught TypeError: Cannot read property 'isPlaceholder' of null”.Jan 8 2015, 1:29 PM
Esanders renamed this task from In a 2 x 4 table, inserting column before/after gives JS error “Uncaught TypeError: Cannot read property 'isPlaceholder' of null” to Merging cells to 'delete' entire rows or columns causes errors.

The problem is that you are generating an invalid table by merging entire rows. The HTML you generate, with rowspan="3" but not actually spanning any rows will break in most browsers. Our merge tool should be able to deal with this though.

This is actually conceptually not that straightforward, consider the following merge operation:

pasted_file (139×154 px, 3 KB)

This results in table going from 4 logical rows to 3.

Change 183510 had a related patch set uploaded (by Esanders):
Remove redundant rows/cols after cell merge

https://gerrit.wikimedia.org/r/183510

Patch-For-Review

Jdforrester-WMF lowered the priority of this task from High to Medium.
Jdforrester-WMF moved this task from To Triage to Blocked on the VisualEditor board.

Change 183510 merged by jenkins-bot:
Remove redundant rows/cols after cell merge

https://gerrit.wikimedia.org/r/183510