Skip to content

List block: when removing an empty list item, should not merge two list items #12398

@v18

Description

@v18

Describe the bug
When I press the 'delete' key on an empty list item, the item below the empty one gets merged with the one above.

A gif demo:

remove-empty-list-item

To Reproduce
Steps to reproduce the behavior:

  1. Make a new list gutenberg block
  2. Add some items
  3. Make one of the items empty (no text, but still with a number / bullet)
  4. Put cursor at the empty list item
  5. Press 'delete' on your keyboard
  6. See the two items around the empty list item merged

Expected behavior

Starting from this list:

list-before-delete

1. Apples
2. Oranges
3. 
4. Limes
5. Lemons

I expected to see this after pressing 'delete' on item 3:

list-after-delete

1. Apples
2. Oranges
4. Limes
5. Lemons

Metadata

Metadata

Assignees

Labels

[Block] ListAffects the List Block[Feature] Writing FlowBlock selection, navigation, splitting, merging, deletion...[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions