Skip to content

WebUI: the first load stays on the page - #6

Merged
ifoknr merged 1 commit into
mainfrom
fix-webui-first-load
Oct 22, 2026
Merged

ifoknr merged 1 commit into
mainfrom
fix-webui-first-load

Conversation

@ifoknr

@ifoknr ifoknr commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

On its first load the WebUI ran history.back(). loadPage('home') treats any move to Home from another page as "drop the entry we pushed", and on the first load the current page is empty, not Home. With no entry of its own to drop, it went back to whatever came before. A fresh browser tab went blank. The system back from a page went back twice and left the WebUI.

It now goes back only when the current history entry is the one the WebUI pushed (history.state === true).

Checked in Chromium (one browser session, in order):

  • The first load stays on Home.
  • Actions through the navbar, then Home through the navbar, back on Home.
  • Settings, then the browser's back, back on Home with the WebUI still open.
  • No page errors.

@ifoknr
ifoknr merged commit 13c84b5 into main Oct 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant