-
-
Notifications
You must be signed in to change notification settings - Fork 575
fix: re-evaluate side-menu on scroll #1830
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 ↗︎
|
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
@@ -192,6 +192,12 @@ export class SideMenuView< | |||
true, | |||
); | |||
|
|||
// Update state when the editor scrolls | |||
this.pmView.root.addEventListener( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, though we already attach an existing onScroll
handler a few lines below - wouldn't it make more sense to call this.updateStateFromMousePos
there instead of creating an additional listener?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see that one! Very true
This attempts to resolve a bug where scrolling with a mouse over an element will keep the block side menu attached to the previous block rather than re-evaluating to the new hovered block.
This makes it more inline with normal hover behavior
Left old behavior, Right new behavior:
Screen.Recording.2025-07-09.at.09.52.52.mp4