List: Deleting an empty item at the top of a (malformed) list reshuffles the block #55757
Open
Description
opened on Nov 1, 2023
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:
Activity