-
-
Notifications
You must be signed in to change notification settings - Fork 555
fix: Side menu showing when editor isn't focused. #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This reverts commit 805b6fa.
I'm not sure if I agree with this in terms of UX. For example, if I check the preview in https://blocknote-website-git-side-menu-behaviour-change-typecell.vercel.app, when I'm browsing the website, and hovering over the editor, the side menu would normally give me an indication that I can edit the document and / or take certain actions |
Do you think adding functions to e.g. force hide the menus would make more sense? I agree that it's nice to have the side menu appear even when the editor isn't focused, but I don't think there's a different condition that it makes sense to use if we automatically want to hide it in cases like #201. |
… but the hovered element is not its descendant
Ok so this currently breaks because the side menu itself is not a descendant of the editor. To get the current behaviour, AFAIK the only way to fix this is to make the side menu a descendant of the editor. So fixing #233 will also fix this PR and vice-versa. UPDATE: Ignore this, I am very stupid |
It probably doesn't make sense to show the block side menu if the user hovers a different element that's displayed on top of the editor, since it's distracting to have the side menu moving around when you aren't focused on the editor. See issue #201 for an example of this. This PR makes it so that the side menu is hidden when the mouse hovers an element that is not a descendant of the editor, but is within its bounding box.
Closes #201
Also helps with #185, but doesn't solve the issue completely