Bug: Deleting first list item with nested list items and no siblings of same depth results in a strange cursor position
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
When deleting a list item that has no next sibling of the same depth, the selection ends up in a weird state
Lexical version: 0.9.1 (looks to occur on current lexical playground too)
## Steps To Reproduce
Start with a list item like the following:
- ABC
- XYZ
Delete the ABC text and then hit backspace one more time to delete the topmost list item

Cursor is now in a weird state

## The expected behavior
I would expect the cursor to be at the top left of the editor
Contributor guide
Research direction
Reproduce the nested-list deletion sequence in the current Lexical playground, starting with a top-level item containing only a nested item. Trace the list deletion and selection handling; the fix is complete when deleting the top-level item leaves the cursor at the editor's top-left position.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100