Skip to content

Backspace on an empty list item does not remove the list (Enter does) #338

Description

@semimikoh

What happened:

In the document editor, applying a numbered (or bulleted) list to an empty paragraph and then pressing Backspace to remove the list does nothing. The list marker / numbering stays and the block is not converted back to a normal paragraph, so there is no way to exit the list with Backspace.

Notably, Enter on an empty list item already works correctly — it exits the list and converts the item back to a normal paragraph. Only the Backspace path is missing this behavior, so the two are inconsistent.

What you expected to happen:

Pressing Backspace at the start (offset 0) of an empty list item should remove the list formatting and convert the item back to a normal paragraph — matching Google Docs / Notion and matching what Enter already does in this editor.

How to reproduce it (as minimally and precisely as possible):

  1. Open a document on https://wafflebase.io/
  2. In an empty paragraph, apply a numbered list (Numbering) from the toolbar
  3. The caret is now in an empty list item (offset 0)
  4. Press Backspace
  5. Expected: the list formatting is removed and the block becomes a normal paragraph
  6. Actual: nothing happens — the block stays a list item with its marker/number

Control: press Enter instead of Backspace on the empty list item → it correctly exits the list (works as expected).

Anything else we need to know?:

  • The asymmetry is a strong hint: Enter on an empty list item exits the list, but Backspace does not. The "exit empty list item → paragraph" handling appears to exist on the split (Enter) path but is missing on the delete-backward (Backspace) path.
  • Likely localized to the docs delete-backward handling; a non-list empty paragraph handles Backspace normally, so this is specific to list items.
  • AI assistance: drafted with help from Claude Code (repro phrasing and code-path hint). I reproduced the issue myself and confirmed the behavior.

Environment:

  • Operating system: macOS Sonoma 14.6.1
  • Browser and version: Chrome 148.0.7778.215 (arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocsRelated to wafflebase docs component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions