Skip to content

Stop the last TOC link from scrolling the whole docs page away - #40

Merged
radiumcoders merged 1 commit into
mainfrom
fix-toc-last-item-scroll
Sep 27, 2026
Merged

radiumcoders merged 1 commit into
mainfrom
fix-toc-last-item-scroll

Conversation

@radiumcoders

Copy link
Copy Markdown
Owner

The command dialog's sr-only header is absolutely positioned with no positioned ancestor, so it sat at the bottom of the docs content relative to the viewport and made as tall as the article. Jumping to a heading the docs box couldn't scroll to the top (like the last one) then scrolled the page itself, shoving the layout up with no way back since body hides overflow. Making the docs scroll box the containing block keeps such elements inside it.

The command dialog's sr-only header is absolutely positioned with no
positioned ancestor, so it sat at the bottom of the docs content relative
to the viewport and made <html> as tall as the article. Jumping to a
heading the docs box couldn't scroll to the top (like the last one) then
scrolled the page itself, shoving the layout up with no way back since
body hides overflow. Making the docs scroll box the containing block keeps
such elements inside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
evil-buttons Ready Ready Preview Sep 27, 2026 1:04pm UTC

@radiumcoders
radiumcoders merged commit bc51e4e into main Sep 27, 2026
2 of 4 checks passed
@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 12be0132-634b-4d5e-b026-015e3577c735

📥 Commits

Reviewing files that changed from the base of the PR and between 1d3ce68 and 094b0d4.

📒 Files selected for processing (1)
  • components/docs-shell.tsx
 __________________________________________________________________
< Ah yes, the classic pattern: 'parse first, ask questions never'. >
 ------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@radiumcoders
radiumcoders deleted the fix-toc-last-item-scroll branch September 30, 2026 11:20

This branch was successfully deployed

1 active deployment
Preview — 094b0d4b Deployed Sep 27, 2026 by vercel[bot]
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