mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 00:13:13 +09:00
BrowserRouter has no scroll handling and the browser's own restoration runs before the page has loaded its data, so it lands short. Track the window scroll per history entry in sessionStorage and restore it on POP, retrying as the page grows until it fits, the user scrolls or 5 s pass. Pushing a new pathname scrolls to the top; query-only pushes (table sort, filter, page) keep the position. Closes #1247 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>