Skip to content

Bug: select all + delete should remove all blocks #3682

Closed

Description

@DaniGuardiola

When doing select all (e.g. ctrl + A or cmd + A on Mac - I think), and then pressing delete or backspace, my expectation would be that all of the content is completely erased, including any blocks, and instead you'd get the same thing you'd get when loading an editor instance without initial state: an empty paragraph block.

Instead, what happens is that everything is removed, but the remaining block is what the first block already was, except empty. For example, if the first block was a list item, it will remain after following this process, but empty.

Lexical version: 0.7.5

Steps To Reproduce

  1. Put some stuff on the editor. Make sure the first block is not a paragraph block.
  2. Select all.
  3. Delete.
select-all-bug.mp4

Activity

  1. self-assigned this
    on Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions