From 2449c3f3857b1c20c124aa1818c2d94e3416cd71 Mon Sep 17 00:00:00 2001 From: jelveh Date: Fri, 24 Apr 2026 23:18:50 -0700 Subject: [PATCH] Scroll dashboard content to top on change --- src/gui/src/UI/Dashboard/UIDashboard.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/src/UI/Dashboard/UIDashboard.js b/src/gui/src/UI/Dashboard/UIDashboard.js index 52af78aa3..30173b1ac 100644 --- a/src/gui/src/UI/Dashboard/UIDashboard.js +++ b/src/gui/src/UI/Dashboard/UIDashboard.js @@ -374,6 +374,9 @@ async function UIDashboard (options) { document.querySelector('.dashboard-content').classList.add(tab); } + // Scroll content area to top + $el_window.find('.dashboard-content').scrollTop(0); + // If files tab with path, navigate without adding to history if ( tab === 'files' && filePath ) { const filesTab = tabs.find(t => t.id === 'files'); @@ -416,6 +419,9 @@ async function UIDashboard (options) { history.replaceState(null, '', newHash ? `#${newHash}` : window.location.pathname); } + // Scroll content area to top + $el_window.find('.dashboard-content').scrollTop(0); + // Close sidebar on mobile after selection $el_window.find('.dashboard-sidebar').removeClass('open'); $el_window.find('.dashboard-sidebar-toggle').removeClass('open');