fix: Backspace/enter behaviour in empty block with children#2451
fix: Backspace/enter behaviour in empty block with children#2451matthewlipski wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
|
@matthewlipski it's good that we don't lose content anymore, but in this case, I find the result unexpected, I would expect the item to preserve it's indentation not collapse because I removed the empty line |
nperez0111
left a comment
There was a problem hiding this comment.
Code seems fine, could do with some comments since this is a bit convoluted
Ah, so I do kind of agree but this is the same behaviour as Notion, so imo it's better to keep it the way it is: Screen.Recording.2026-02-17.at.16.57.40.mov |
|
It handles list items differently. So weird decision on their part, imo I would prefer what I'd described, but doesn't have to block this issue if you feel differently |
Summary
There are currently 2 issues with backspace/enter handling in empty blocks with children:
Closes #1593
Rationale
This is a bug affecting core functionality.
Changes
Added handling for children in relevnt keyboard handlers.
Impact
N/A
Testing
Added e2e tests.
Screenshots/Video
Checklist
Additional Notes