From d05b5fb20a00ca0d386a2b9e670dfcb952993cc3 Mon Sep 17 00:00:00 2001 From: Ryderjj89 Date: Sun, 28 Sep 2025 16:53:06 -0400 Subject: [PATCH] Added auto-scroll-to-top on all page navigations - fixes mobile scrolling issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - **Navigation auto-scroll**: window.scrollTo(0, 0) added to location.pathname useEffect - **Mobile UX fix**: No more manual scrolling back up after version selection - **Smooth navigation flow**: Every route change brings user to page top - **Better mobile experience**: Prevents getting stuck scrolled down on new pages - **Applies to all routes**: Home → Books → Chapters → Verses all auto-scroll to top Mobile users can now seamlessly navigate without manual scrolling between pages! --- frontend/src/App.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index ca528eff..11ba6479 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -43,6 +43,9 @@ function App() { // At root path, no version is selected setSelectedVersion(''); } + + // Scroll to top when navigating to new pages + window.scrollTo(0, 0); }, [location.pathname]); useEffect(() => {