Skip to content

feat: update suggestion menu component#2397

Merged
matthewlipski merged 2 commits intoTypeCellOS:mainfrom
MDSAM05:suggestion-menu-fix
Feb 13, 2026
Merged

feat: update suggestion menu component#2397
matthewlipski merged 2 commits intoTypeCellOS:mainfrom
MDSAM05:suggestion-menu-fix

Conversation

@MDSAM05
Copy link
Contributor

@MDSAM05 MDSAM05 commented Jan 30, 2026

Summary

Fixes unexpected page scrolling when navigating the suggestion menu with keyboard arrow keys, especially when wrapping from the last item to the first (and vice versa).

Rationale

Arrow key navigation caused the page to scroll when wrapping between suggestions, leading to a poor editor experience.
This fix enables smooth circular navigation by keeping focus stable and preventing unwanted scrolling.

Changes

  • Replaced scrollIntoView(true/false) with scrollIntoView({ block: "nearest" }) to prevent page jumps.
  • Scrolled the active suggestion into view only when it overflows.
  • Enabled smooth circular navigation without focus changes.

Impact

  • Improves keyboard navigation UX by eliminating unexpected page scrolling.
  • Keeps suggestion navigation smooth and predictable inside the editor.
  • No breaking changes to existing functionality.

Testing

  • Manually verified arrow key navigation without page scroll.
  • Confirmed Enter key selection works as expected.

Screenshots/Video

Recording.2026-01-29.213625.mp4

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

@vercel
Copy link

vercel bot commented Jan 30, 2026

@MDSAM05 is attempting to deploy a commit to the TypeCell Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 30, 2026

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/ariakit@2397

@blocknote/code-block

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@2397

@blocknote/core

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@2397

@blocknote/mantine

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@2397

@blocknote/react

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@2397

@blocknote/server-util

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@2397

@blocknote/shadcn

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/shadcn@2397

@blocknote/xl-ai

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@2397

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@2397

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-email-exporter@2397

@blocknote/xl-multi-column

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@2397

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@2397

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@2397

commit: 6b1d566

@vercel
Copy link

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Feb 13, 2026 5:04pm
blocknote-website Error Error Feb 13, 2026 5:04pm

Request Review

@matthewlipski
Copy link
Collaborator

I'm wondering if we're going about the UX of scrolling while the slash menu is open the right way. Notion initially scrolls to the selection/slash menu when opened, but then blocks scrolling the document afterwards.

@nperez0111 do you think it makes any sense to replicate that?

If we do want to deviate from Notion's UX here and allow users to scroll the document while the slash menu is open, we should also make sure that changing the selected item always scrolls it into view. Currently, this happens inconsistently.

For now, I'll merge this PR as it fixes a bug with the scrolling. Depending on what UX solution we decide on, I'll create separate issues later.

@matthewlipski matthewlipski merged commit ba03b7d into TypeCellOS:main Feb 13, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants