Skip to content

Bug when deleting indentation of multi-level block #2066

@KouzanaFedi

Description

@KouzanaFedi

Describe the bug

When we have the whole block indented, inside that block we have more content that is indented on the second level bellow it content under the first indentation. If we delete the first line of the block that is under the root indentation, the indentation is removed but all the data that is bellow the second level indentation is removed.

Describing the issue is a bit hard so this is a screen record reproducing the bug on the public editor in https://www.blocknotejs.org/

Screen.Recording.2025-10-05.at.10.07.14.PM.mov

Found this bug while trying to fix this bug inside the app that is using the editor

To Reproduce

  1. Indent block
  2. Add content to the first line of the block (let's call this A)
  3. Return to line (stay in the indented group)
  4. Add more content and Indent some of it
  5. Go back to A the first line of the indented group and Backspace from the start of that line
  6. The root indentation is removed
  7. All the content bellow the 2nd level indentation is removed (NG)

Misc

  • Node version:
  • Package manager:
  • Browser:
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

Labels

bug:P2High: Core functionality significantly impacted.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions