BlockNote
BlockNote copied to clipboard
Side Menu showing when the cursor is outside the editor
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.
Misc
- Browser: chrome
- [ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖
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
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)
have the same issue, we put blocknote inside a note card in a whiteboard
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.
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
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?
+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.
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