Skip to content

Slash menu is clipped inside the editor when editor height is small #2543

@yannishin

Description

@yannishin

What’s broken?

When the editor height is set to a small value, the slash menu (triggered by typing /) gets trapped within the editor's bounding area and is cut off — part of the menu is not visible to the user.

What did you expect to happen?

The slash menu should render as a floating overlay that escapes the editor's bounding box and remains fully visible, regardless of the editor's height.

Image

Steps to reproduce

  1. Set the editor container to a small height (e.g. ~100px)
  2. Click inside the editor
  3. Type / to trigger the slash menu
  4. Observe that the slash menu is clipped and cut off within the editor boundary

Optional: You can reproduce this on the official minimal demo without any code changes:
https://www.blocknotejs.org/examples/basic/minimal
→ Open browser DevTools → select the editor element → reduce its height

Steps to reproduce

No response

BlockNote version

v.0.47.1

Environment

No response

Additional context

The slash menu appears to be rendered inside the editor's DOM subtree and is constrained by overflow: hidden on a parent element. The menu should ideally be portaled to document.body or use a positioning strategy (e.g. Floating UI's strategy: 'fixed') to escape parent overflow constraints.

Contribution

  • I'd be interested in contributing a fix for this issue

Sponsor

  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:P2High: Core functionality significantly impacted.sponsorReported by or on behalf of a sponsor or paying customer and eligible for prioritized attention.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions