diff --git a/src/_includes/toc.njk b/src/_includes/toc.njk index 6db3bb2d..232b4249 100644 --- a/src/_includes/toc.njk +++ b/src/_includes/toc.njk @@ -63,8 +63,8 @@ // Remove the stickiness of the sidebar ToC if it is larger than screen height function preventSidebarOverflow() { if (document.documentElement.clientHeight < tocEl.offsetHeight + 50) { - tocEl.style.marginTop = "0"; - tocEl.style.position = "static"; + tocWrapper.style.marginTop = "0"; + tocWrapper.style.position = "static"; } } preventSidebarOverflow();