Page MenuHomePhabricator

VisualEditor: Deletion into a DL from a block slug breaks
Closed, ResolvedPublic

Description

Click after the line "Saptaitey Chiranjeevinaha[citation needed]" on https://en.wikipedia.org/wiki/Chiranjivi and BANG! And the text is gone.


Version: unspecified
Severity: major

Details

Reference
bz50076

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:56 AM
bzimport set Reference to bz50076.

Yuck. Thrown error is:

Uncaught TypeError: Object #<VeCeDefinitionListNode> has no method 'getAnnotatedHtml'

Sounds like we didn't update the CE nodes for DLs.

DefinitionListNode shouldn't have getAnnotatedHtml, it's not inside a content branch. Did we screw up the DM such that a definition list ended up inside a paragraph?

I can't reproduce this any more, can anyone else?

Yes; you need to backspace over the DL from the block slug underneath it to trigger.

(In reply to comment #4)

Yes; you need to backspace over the DL from the block slug underneath it to
trigger.

Yeah, that breaks it. For some reason handleDelete() tries to process *two* transactions: one successfully removes the entire <dl>, and the second tries to reinsert part of it but in the middle of a paragraph, presumably because it computed the wrong offset somehow (failing to adjust for the first transaction, maybe)?

Change 73952 had a related patch set uploaded by Esanders:
Handle backspace correctly when in a root slug

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

Change 73952 merged by jenkins-bot:
Handle backspace correctly when in a slugs

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