Empty annotations like <small></small> are converted to meta items. So if you have a bunch of paragraphs like <p>Foo<small></small>bar</p> and delete them all, you end up with a pile of <small></small><small></small>... tags. This is especially bad when this happens in table cells whose row is deleted, because then the <small></small> stuff ends up being foster-parented out of the table.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • ppelberg | T197990 Visual editor inserts extraneous blank lines (due to <nowiki/> pulled out of paragraph and then disappearing) | |||
Resolved | • ppelberg | T96528 Empty annotations cannot be deleted |
Event Timeline
What are the real world examples where these annotations come up?
Could we flag some meta items as 'deletable' for the transaction builder?
https://office.wikimedia.org/w/index.php?diff=prev&oldid=144735 was where we noticed it.
Change 205291 had a related patch set uploaded (by Esanders):
Add removable flag to meta items
De-prioritising, now that Parsoid trims empty annotations (at least some of the time).
Change 205291 abandoned by Esanders:
ve.dm.MetaItem: Add removable flag, split from internal state
Reason:
Metadata no longer exists, bug has been fixed in Parsoid.
Testing this on Beta Cluster just now given the prompt of the old code being abandonned, I confirmed that this is a problem (and possibly it's worse than it was before?):
Change 442335 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[VisualEditor/VisualEditor@master] ve.dm.MetaItem: Add removable flag
Change 442335 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] ve.dm.MetaItem: Add removable flag
Change 513192 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (d9ece414a)
Change 513192 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (d9ece414a)