fix: Auto-hide TOC when window shrinks below mobile breakpoint (#12014)

This commit is contained in:
Tom Moor authored and GitHub committed 2026-04-13 18:04:27 -04:00
1 parent 054404d716
commit fc16d3100a
1 file changed
+6
@@ -125,6 +125,12 @@ function DocumentHeader({
const showContents =
ui.tocVisible === true || (isShare && ui.tocVisible !== false);
useEffect(() => {
if (isMobile && showContents) {
ui.set({ tocVisible: false });
}
}, [isMobile, showContents, ui]);
const toc = (
<Tooltip
content={