Skip to content

fix: avoid TOC anchors being hidden by header#468

Merged
OXeu merged 2 commits into
mainfrom
fix/issue-220-toc-offset
Mar 8, 2026
Merged

fix: avoid TOC anchors being hidden by header#468
OXeu merged 2 commits into
mainfrom
fix/issue-220-toc-offset

Conversation

@OXeu
Copy link
Copy Markdown
Collaborator

@OXeu OXeu commented Mar 8, 2026

Summary

  • measure the rendered header height and expose it as a global scroll offset
  • apply that offset to markdown heading anchors and TOC click scrolling
  • keep anchor jumps and TOC jumps aligned across header layouts

Closes #220

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 8, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25f4a2d185

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread client/src/components/markdown.tsx Outdated
Comment thread client/src/components/header.tsx
@OXeu OXeu merged commit 48ef7f1 into main Mar 8, 2026
7 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 8, 2026

🧹 Preview deployment has been cleaned up.

The temporary preview environment for this PR has been deleted.

@OXeu OXeu deleted the fix/issue-220-toc-offset branch March 12, 2026 17:56
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.

[Bug] Toc 目录跳转被导航遮挡

1 participant