Skip to content

Fix page outline scroll #3563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/breezy-toes-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gitbook": patch
---

Fix scroll of page outline
4 changes: 2 additions & 2 deletions packages/gitbook/src/components/PageAside/PageAside.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function PageAside(props: {
>
<PageAsideHeader context={context} />
{page.layout.outline ? (
<div>
<div className="overflow-y-auto border-tint xl:max-2xl:page-api-block:border-t">
{document ? (
<React.Suspense fallback={null}>
<PageAsideSections document={document} context={context} />
Expand Down Expand Up @@ -162,7 +162,7 @@ async function PageAsideSections(props: { document: JSONDocument; context: GitBo
const sections = await getDocumentSections(context, document);

return sections.length > 1 ? (
<div className="-mt-8 overflow-y-auto border-tint pt-8 pb-5 empty:hidden xl:max-2xl:page-api-block:mt-0 xl:max-2xl:border-t xl:max-2xl:page-api-block:p-2">
<div className="-mt-8 pt-8 pb-5 empty:hidden xl:max-2xl:page-api-block:mt-0 xl:max-2xl:page-api-block:p-2">
<ScrollSectionsList sections={sections} />
</div>
) : null;
Expand Down