Skip to content

Improve delete key behavior near image blocks #1478

Closed
@jorgefreires

Description

@jorgefreires

Is your feature request related to a problem? Please describe.

I experience unexpected behavior when working with images in BlockNote. When editing a paragraph adjacent to an image block and pressing the Delete key at the start of the subsequent line, the image gets deleted rather than the cursor moving into the image block.

Examples of current behavior vs expected behavior:

Expected (Google Docs behavior):
https://github.com/user-attachments/assets/1e1f97f8-2438-4d63-8b23-36a991ea8711
Cursor moves into image block when deleting at line start

Current (BlockNote behavior):
https://github.com/user-attachments/assets/f0b24e02-7ff8-479e-a75d-e05328059d20
Image gets deleted when using Delete key at line start

Describe the solution you'd like
The cursor should move into the image block when pressing Delete at the beginning of the subsequent line, rather than deleting the image. This should mirror the behavior seen in Google Docs and other mainstream text editors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions