From 056f89fcfdbf76474d5647afcaf1b21aaf962cb4 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 9 Jul 2021 04:07:28 -0700 Subject: [PATCH] fix: Allow TOC to scroll when larger than browser height (#2296) --- app/scenes/Document/components/Contents.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/scenes/Document/components/Contents.js b/app/scenes/Document/components/Contents.js index 001b3fabd..5ba0faac0 100644 --- a/app/scenes/Document/components/Contents.js +++ b/app/scenes/Document/components/Contents.js @@ -70,11 +70,13 @@ const Wrapper = styled("div")` display: none; position: sticky; top: 80px; + max-height: calc(100vh - 80px); box-shadow: 1px 0 0 ${(props) => props.theme.divider}; margin-top: 40px; margin-right: 2em; min-height: 40px; + overflow-y: auto; ${breakpoint("desktopLarge")` margin-left: -16em;