You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistent behaviour of side menu when cursor outside editor #417
An inconsistent behaviour of side menu showing up outside editor.
It will show up when the cursor is outside editor, both left and right.
However, it does not show when cursor is out of y-axis but inside x-axis(top and down area bound by editor width).
Can it only show up when cursor is insider editor?
My use-case is a floating, draggable note and I understand that this is not default BlockNote design(Notion-alike). It will still be much appreciated to have some tunes and make it more universal and clean.
Maybe PR#99 block-side-menu-detection-fix will be able to address this issue.
This is actually a surprisingly complex issue as the side menu is not necessarily inside the bounding box for the editor, especially when you consider that the React component can be replaced with smth completely different. I think you definitely still want the side menu to show up when hovering over it, even if it's technically outside the editor, so we can't just make it show only when the mouse cursor is within the editor.
It probably makes most sense to allow consumers to define an element/DOMRect in which the side menu should be shown, but we don't have a clear idea for how that API should look yet. Thanks for bringing this up though, it's something we'll look into fixing!
I've tested the preview available at #99, and I can confirm that it resolves the problem. @matthewlipski, could you please provide the rationale behind closing this PR? I'm really hoping you can merge this.
Activity
matthewlipski commentedon Dec 5, 2023
This is actually a surprisingly complex issue as the side menu is not necessarily inside the bounding box for the editor, especially when you consider that the React component can be replaced with smth completely different. I think you definitely still want the side menu to show up when hovering over it, even if it's technically outside the editor, so we can't just make it show only when the mouse cursor is within the editor.
It probably makes most sense to allow consumers to define an element/
DOMRectin which the side menu should be shown, but we don't have a clear idea for how that API should look yet. Thanks for bringing this up though, it's something we'll look into fixing!ivorpad commentedon Dec 14, 2023
I've tested the preview available at #99, and I can confirm that it resolves the problem. @matthewlipski, could you please provide the rationale behind closing this PR? I'm really hoping you can merge this.
awkwardnovice commentedon Apr 9, 2024
Having this issue as well. Also happens when clicking outside of the editor.
Confusing and distracting UX behavior.