Apply sticky removal to the correct ToC element
This commit is contained in:
parent
dbe2f4896a
commit
1230880e84
|
@ -63,8 +63,8 @@
|
||||||
// Remove the stickiness of the sidebar ToC if it is larger than screen height
|
// Remove the stickiness of the sidebar ToC if it is larger than screen height
|
||||||
function preventSidebarOverflow() {
|
function preventSidebarOverflow() {
|
||||||
if (document.documentElement.clientHeight < tocEl.offsetHeight + 50) {
|
if (document.documentElement.clientHeight < tocEl.offsetHeight + 50) {
|
||||||
tocEl.style.marginTop = "0";
|
tocWrapper.style.marginTop = "0";
|
||||||
tocEl.style.position = "static";
|
tocWrapper.style.position = "static";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
preventSidebarOverflow();
|
preventSidebarOverflow();
|
||||||
|
|
Loading…
Reference in New Issue