diff --git a/static/client/components/Navigation/NavigationElement/NavigationElement.tsx b/static/client/components/Navigation/NavigationElement/NavigationElement.tsx index 58f8218e..2b5c042b 100644 --- a/static/client/components/Navigation/NavigationElement/NavigationElement.tsx +++ b/static/client/components/Navigation/NavigationElement/NavigationElement.tsx @@ -50,6 +50,12 @@ const NavigationElement = ({ activePageName, page, project, onSelect }: INavigat } }, [page?.children]); + useEffect(() => { + if (activePageName === page.name) { + document.querySelector('li[aria-selected="true"]')?.scrollIntoView({ behavior: "smooth", block: "center" }); + } + }, [activePageName, page.name]); + return (