Page MenuHomePhabricator

Deleting a table with labeled section tags is not undoable
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue:

What happens?:
JavaScript error: Uncaught Error: Cannot add a alienBlock node to tableSection node

If there are more than one similar table on the page, that can fully break editing (real example).

What should have happened instead?:
The table should be re-added.

By the way, I would welcome any advice about how to better place the <section> tags for this use case, if that allows to workaround this issue and the first row disabled.

Event Timeline

It fails in a particularly poor way because the <section …/> tags are placed immediately after |- on the same line, in the same place where the HTML attributes for the table row would go. This results in <tr … typeof="mw:ExpandedAttrs"> in the Parsoid output, which we don't recognize as a real table row in VE. I'm not sure if Parsoid handles this entirely correctly.

We should support that better (in the worst case, we could mark the table as uneditable in VE).

My advice on how to make this work better today:

Many thanks for the advice! ☺️