Skip to content

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: 5faa903

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.

1 participant