mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
Fix Firefox mobile sidepanel TOC scroll by constraining sheet flex height (#4062)
This commit is contained in:
@@ -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 ? (
|
||||
|
||||
Reference in New Issue
Block a user