Fix Firefox mobile sidepanel TOC scroll by constraining sheet flex height (#4062)

This commit is contained in:
Greg Bergé
2026-02-27 11:21:17 +01:00
committed by GitHub
parent 41ef3435bc
commit 5efe13e622
2 changed files with 6 additions and 1 deletions
@@ -87,7 +87,9 @@ export async function TableOfContents(props: {
'lg:page-no-toc:pr-0',
'max-lg:pl-8',
'flex',
'flex-col',
'min-h-0',
'gap-4',
className
)}
@@ -207,7 +207,6 @@ export function SideSheet(
'fixed inset-y-0 z-41', // Above the side sheet overlay on z-40
side === 'left' ? 'left-0' : 'right-0',
withCloseButton ? 'max-w-[calc(100%-4rem)]' : 'max-w-[calc(100%-3rem)]',
shouldHide ? 'hidden' : '',
isOpen
? side === 'left'
? 'hydrated:animate-enter-from-left'
@@ -223,6 +222,10 @@ export function SideSheet(
aria-expanded={isOpen}
aria-modal={isModal}
{...rest}
style={{
...rest.style,
display: shouldHide ? 'none' : rest.style?.display,
}}
>
{children}
{withCloseButton ? (