Skip to content

Enter Key Breaks Children in Custom Toggleable Blocks #2020

@FatefulNur

Description

@FatefulNur

Describe the bug
When pressing Enter inside a custom toggleable block, the children are broken unexpectedly.

  • If the cursor is on the toggle title, all children should be preserved, but they are not.
  • If the cursor is inside the children, pressing Enter should move the cursor to the next child (if it exists) or create a new default block.

To Reproduce

  1. Open the example: https://www.blocknotejs.org/examples/custom-schema/toggleable-blocks
  2. Place the cursor in the toggle title and press Enter.
  3. Observe that the children are broken.

Misc

  • Node version: 22.13.0
  • Package manager: npm
  • Browser: Firefox
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Screencast.from.2025-09-13.21-28-46.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions