From fba2da5da2399855b01f20dd8b6d4b828ee7e11c Mon Sep 17 00:00:00 2001 From: IFOKNR <253658289+ifoknr@users.noreply.github.com> Date: Thu, 22 Oct 2026 04:24:12 +0000 Subject: [PATCH] WebUI: the first load no longer goes back to the previous page, and the system back from a page stops at Home --- src/webroot/js/pages/pageLoader.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webroot/js/pages/pageLoader.js b/src/webroot/js/pages/pageLoader.js index 70932ae..d82262f 100644 --- a/src/webroot/js/pages/pageLoader.js +++ b/src/webroot/js/pages/pageLoader.js @@ -452,7 +452,9 @@ export async function loadPage(pageId) { } finally { isPageTransitioning = false - if (pageId === 'home' && currentPage !== 'home') + /* INFO: Only drop the entry this WebUI pushed. On the first load there is none, and going + back would leave the WebUI for whatever page came before it. */ + if (pageId === 'home' && currentPage !== 'home' && history.state === true) history.back() else if (pageId !== 'home' && currentPage === 'home') history.pushState(true, '', location.pathname)