diff --git a/src/pages/launcher/LauncherSourcePage.tsx b/src/pages/launcher/LauncherSourcePage.tsx index 04dc8a6..cfba68b 100644 --- a/src/pages/launcher/LauncherSourcePage.tsx +++ b/src/pages/launcher/LauncherSourcePage.tsx @@ -315,23 +315,23 @@ function DiffViewer({ diff }: { diff: string }) { const section = sectionRefs.current[file.id]; if (!scroller || !section) return; scroller.scrollTo({ - top: section.offsetTop - scroller.offsetTop - 12, + top: Math.max(section.offsetTop - 12, 0), behavior: 'smooth' }); }; return ( -