From c1624342d3826a2de5df9e6cefbe15bb47393fcf Mon Sep 17 00:00:00 2001 From: Psychotoxical Date: Tue, 7 Apr 2026 22:22:51 +0200 Subject: [PATCH] fix: scroll content-body to top on route change Co-Authored-By: Claude Sonnet 4.6 --- src/App.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index f1947972..7898f83f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -126,6 +126,11 @@ function AppShell() { }; }, [isLoggedIn, activeServerId, setMusicFolders]); + // Reset scroll position on route change + useEffect(() => { + document.querySelector('.content-body')?.scrollTo({ top: 0 }); + }, [location.pathname]); + // Auto-navigate to offline library when no connection but cached content exists const prevConnStatus = useRef(connStatus); useEffect(() => {