Cannot fully scroll in slash menu near end of page
What’s broken?
When the new block menu is open, one is not able to scroll to the end.
Also reproducible on https://www.blocknotejs.org/examples/basic/minimal
What did you expect to happen?
i should be able to see the full menu
Steps to reproduce
write some text in a document. Then when in the bottom quadrant of the page, click the plus symbol or type a slash to open the block selection menu.
Attempt to scroll to the bottom. You are not able to.
Reproduced to happen on both firefox linux and chrome windows on different screen sizes.
BlockNote version
latest as of may 23th
Environment
Chrome, Firefox, Blocknote demo site
Additional context
No response
Contribution
- [ ] I'd be interested in contributing a fix for this issue
Sponsor
- [ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖
I don't see this issue on this page on either firefox or chrome: https://www.blocknotejs.org/examples/basic/minimal
https://github.com/user-attachments/assets/d665855e-392d-49eb-82af-2e510f85c4ae
I don't see this issue on this page on either firefox or chrome: https://www.blocknotejs.org/examples/basic/minimal Screen.Recording.2026-05-24.at.10.03.27.mov
Hi, it indeed only happens when the slash menu is opened in the bottom quadrant of the editing box. Hold enter for a bit until close to the end of the box, and then try again.
Cool, I do see the issue now. Thanks for reporting
diff --git a/packages/core/src/extensions/SuggestionMenu/SuggestionMenu.ts b/packages/core/src/extensions/SuggestionMenu/SuggestionMenu.ts
index 4809607e6..c781ae9fe 100644
--- a/packages/core/src/extensions/SuggestionMenu/SuggestionMenu.ts
+++ b/packages/core/src/extensions/SuggestionMenu/SuggestionMenu.ts
@@ -49,7 +49,7 @@ class SuggestionMenuView {
this.rootEl?.addEventListener("scroll", this.handleScroll, true);
}
- handleScroll = () => {
+ handleScroll = (event: Event) => {
if (this.state?.show) {
const decorationNode = this.rootEl?.querySelector(
`[data-decoration-id="${this.pluginState!.decorationId}"]`,
@@ -57,6 +57,16 @@ class SuggestionMenuView {
if (!decorationNode) {
return;
}
+ // `capture=true` makes this fire for every scroll in the editor subtree,
+ // including the suggestion menu's own `overflow-y: auto` scroll. Only the
+ // scroll of an ancestor that actually contains the cursor decoration can
+ // move its on-screen position, so we ignore scrolls from elements that
+ // don't contain it. Otherwise scrolling inside the menu would recompute
+ // `referencePos` and reposition the menu, causing it to jitter (#2771).
+ const scrollTarget = event.target as Node | null;
+ if (scrollTarget && !scrollTarget.contains(decorationNode)) {
+ return;
+ }
this.state.referencePos = decorationNode
.getBoundingClientRect()
.toJSON() as DOMRect;
Working git patch that resolves the issue. Not PRring yet as i don´t fully get why this happens.
Interestingly, it also seems vaguely dependent on your screen size. I cannot easily reproduce on my higher-quality bigger screen.
+1 @Wqrld thank you for the patch!
Also experiencing this issue. Any update on this? Attached a video from the documentation pages displaying the issue. Its still a problem on the latest version of blocknote, and happens both on keyboard navigation and scroll.
https://github.com/user-attachments/assets/0345cbd8-c58e-4345-bfca-616e27a65137
I’ve encountered the same problem too.