BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Enter Key Breaks Children in Custom Toggleable Blocks

Open FatefulNur opened this issue 4 months ago • 2 comments

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 💖

https://github.com/user-attachments/assets/eb85ca78-7b74-497d-944e-27017ba6f675

FatefulNur avatar Sep 20 '25 09:09 FatefulNur