SPA nav improvements: scroll restoration, popstate, history spec
- boot.sx: popstate handler extracts scrollY from history state - engine.sx: pass scroll position to handle-popstate - boot-helpers.sx: scroll position tracking in navigation - orchestration.sx: scroll state management for back/forward nav - history.spec.js: new Playwright spec for history navigation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -501,7 +501,10 @@
|
||||
"#sx-content")))
|
||||
(if
|
||||
(try-client-route (url-pathname href) target-sel)
|
||||
(do (browser-push-state nil "" href) (browser-scroll-to 0 0))
|
||||
(do
|
||||
(save-scroll-position)
|
||||
(browser-push-state nil "" href)
|
||||
(browser-scroll-to 0 0))
|
||||
(do
|
||||
(log-info (str "sx:route server fetch " href))
|
||||
(dom-set-attr link "sx-get" href)
|
||||
|
||||
Reference in New Issue
Block a user