TypeCellOS / TypeCellOS/BlockNote

Editor in dialog overlapping another breaks SideMenu and drag-and-drop

Open
#2,559 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug:P4
Dominant language
TypeScript
Stars
10.2k
Forks
772
Avg merge
3d 11h
Merged PRs (30d)
17

Description

What’s broken?

We have a setup with an editor and a button next to it that opens another editor instance in a dialog above it. In areas where the two editors directly overlap, the SideMenu does not appear in the topmost editor. Drag and drop is also not possible in these overlapping areas.

https://github.com/user-attachments/assets/be553b97-812c-487e-9f84-7aa12d7f9e20

The root cause is likely in findClosestEditorElement (in SideMenu.ts) because it does not consider the z-axis stacking order when determining the editor element.

What did you expect to happen?

Option 1
Ensure Sidebar and drag-and-drop interactions only consider the topmost editor.

Option 2
Add an option to exclude specific editors (for example editors behind a dialog) from the hover and drag detection logic.

Steps to reproduce

Having an editor in a dialog above another editor

Demo:
https://react-shadcn-blockno-nf9x.bolt.host

BlockNote version

No response

Environment

No response

Additional context

No response

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 💖

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/core/src/extensions/SideMenu/SideMenu.ts at findClosestEditorElement, then reproduce the overlapping-editor case using the linked demo. Trace how SideMenu hover detection and drag-and-drop choose an editor; done means the topmost editor handles both interactions without breaking ordinary editor behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.