From f74a42852197fcb0f0655272bc6d62d456441eff Mon Sep 17 00:00:00 2001 From: "Gan, Jimmy" Date: Wed, 24 Jun 2026 01:29:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20proper=20scroll=20containment=20?= =?UTF-8?q?=E2=80=94=20no=20body=20scroll,=20panel=20overflow-y=20with=20b?= =?UTF-8?q?ind:this=20ref?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/routes/YoutubeDashboard.svelte | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/src/routes/YoutubeDashboard.svelte b/frontend/src/routes/YoutubeDashboard.svelte index 3a153ec..a547748 100644 --- a/frontend/src/routes/YoutubeDashboard.svelte +++ b/frontend/src/routes/YoutubeDashboard.svelte @@ -8,6 +8,7 @@ let isSyncing = $state(false); let syncMessage = $state(''); let theme = $state(localStorage.getItem('theme') || 'dark'); + let summaryPanel = $state(null); function toggleTheme() { theme = theme === 'dark' ? 'light' : 'dark'; @@ -59,10 +60,8 @@ $effect(() => { if (activeTab) loadVideos(); }); $effect(() => { - if (selectedVideo) { - tick().then(() => { - document.getElementById('summary-panel')?.scrollTo({ top: 0, behavior: 'instant' }); - }); + if (selectedVideo && summaryPanel) { + tick().then(() => summaryPanel.scrollTop = 0); } }); onMount(() => { @@ -114,7 +113,7 @@ } -
+
@@ -135,7 +134,7 @@
-
+
-
+
{#if selectedVideo}