Page MenuHomePhabricator

VisualEditor: Backspace should not delete list and line in same action
Open, MediumPublic

Description

Author: mcdevitd

Description:
Typically, the expected behavior from hitting backspace at the beginning of a list line is to remove the bullet/number at that indent level so it is no longer a list, and no more. VisualEditor will completely delete the line itself and move the text to the end of the previous line. This is not how OpenOffice or Word works.

Details

Reference
bz52557

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:54 AM
bzimport set Reference to bz52557.

Agreed. For

<ol><li><p></p></li><li><p>Foo</p></li></ol>

… backspace at the cursor position indicated should convert the document into:

<p></p><ol><li><p>Foo</p></li></ol>

… with the initial <p> being a slug.

For nested list items we should pop to the next level:

<ol><li><p>Foo</p></li><li><ol><li><p></p></li><li><p>Foo</p></li></ol></li></ol>

->

<ol><li><p>Foo</p></li><li><p></p></li><li><ol><li><p>Foo</p></li></ol></li></ol>

I think?

Currently (for years), pressing backspace in LibreOffice makes the paragraph exit the list only if it is empty (note we may split an ordered list in OpenDocuments, whereas we cannot in wikitext). Else, the behavior is pretty consistent with VisualEditor (first Backspace press: the bullet is hidden — no equivalence in VE; second Backspace press: the paragraph is merged with previous element).