BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Side Menu showing when the cursor is outside the editor

Open christojeffrey opened this issue 1 year ago • 5 comments

Describe the bug the side menu is showing up when the mouse cursor is not inside the editor. it's happening when the mouse is correct vertically, but wrong horizontally. I think it's because the side handle the vertical part of the cursor.

To Reproduce check the documentation, find a page with an editor inside. hover your mouse to the left of the editor, up to the sidebar for example. image

Misc

  • Browser: chrome
  • [ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖

christojeffrey avatar Aug 20 '24 12:08 christojeffrey

looks like the code that handle this is somewhere around here https://github.com/TypeCellOS/BlockNote/blob/6d9b8447a106307fb4b53d2032d523aca977b1e1/packages/core/src/extensions/SideMenu/SideMenuPlugin.ts#L344-L361

christojeffrey avatar Aug 20 '24 12:08 christojeffrey

It's intentional for our internal use-cases, but I agree an option for this would be nice.

What are you building with BlockNote btw? (always curious)

YousefED avatar Aug 24 '24 09:08 YousefED

have the same issue, we put blocknote inside a note card in a whiteboard

andreyleskov avatar Aug 25 '24 07:08 andreyleskov

It's intentional for our internal use-cases, but I agree an option for this would be nice.

What are you building with BlockNote btw? (always curious)

thanks for responding! I want to create a resume builder; currently exploring tools to use. as a base I am currently considering tiptap and its derivatives (like BlockNote) or slate as a base.

christojeffrey avatar Aug 26 '24 17:08 christojeffrey

looks like the code that handle this is somewhere around here

https://github.com/TypeCellOS/BlockNote/blob/6d9b8447a106307fb4b53d2032d523aca977b1e1/packages/core/src/extensions/SideMenu/SideMenuPlugin.ts#L344-L361

I think I can try to do it by limiting the drag handle to only be shown when the cursor is inside the parent div

image

christojeffrey avatar Aug 26 '24 17:08 christojeffrey

I have the same problem. I have a sidebar to the left of the editor. When user hovers over menu items in the sidebar this drag handle appears and it's annoying. Is there any way to fix this?

yantakus avatar Oct 15 '25 17:10 yantakus

+1 for making this behavior optional. Also, thanks for your hard work on this editor. It’s the only one I’ve been able to use without running into any issues.

meko-dev avatar Oct 19 '25 22:10 meko-dev

As stated before, this is intentionally designed to be this way. I'd be happy to take a PR which resolves this, it essentially revolves around this if statement: https://github.com/TypeCellOS/BlockNote/blob/7a55c3451a5f902e089736ba0e63eb0c2fa54421/packages/core/src/extensions/SideMenu/SideMenuPlugin.ts#L211

We'd likely need to expose an option to configure this behavior, I'd recommend that it should be named sideMenuHoverDistance & setting it to 0 would disable this, the default can be the current value of 250

nperez0111 avatar Oct 20 '25 07:10 nperez0111