Skip to content

List: Deleting an empty item at the top of a (malformed) list reshuffles the block #55757

Open
@jasmussen

Description

This one is hard to describe, so it's best to test. Here's testing content:

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Item<!-- wp:list -->
<ul><!-- wp:list-item -->
<li></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Item</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Item</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Item</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Item 2<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>Item</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>Item</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

This will create two list items in a list, each item with further nested list items.

Notably the first nested list item of the first list item is empty. If you set focus on that block and press "backspace", suddenly you are focused in a new empty top level list item, as item 2. Expectation would be the list item was simply deleted.

GIF showing the above:

list view bug

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    [Block] ListAffects the List Block[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