Status: done Priority: P0 Created: 2026-02-19 Completed: 2026-02-19
After navigating through pages (including istate/cross-chart routes), using browser back, then browser forward didn't work. The forward history entries were destroyed.
When browser back navigated to a page with an istate (child chart invocation), the
acceptance of the browser nav cleared nav-state. Child chart initialization then fired
async saves that changed the deep URL. These saves hit Branch 4 (programmatic navigation)
in on-save-handler, which called pushState. In browsers, pushState while in the
middle of history destroys all forward entries.
Added settling? atom to install-url-sync! that tracks the brief window after browser
nav acceptance where child saves may fire:
settling? = true, schedule setTimeout(0) in CLJS to auto-clearsettling? immediately(and @settling? (not root-save?)):
replaceState to preserve forward historypushState, clear settling?@settling? with no URL change clears it (CLJ fallback)The (not root-save?) check distinguishes child chart init saves (replaceState) from
user-initiated programmatic navigation (pushState).
src/main/com/fulcrologic/statecharts/integration/fulcro/ui_routes.cljc — settling? atom + Branch 4 logicsrc/test/com/fulcrologic/statecharts/integration/fulcro/url_sync_headless_spec.cljc — new testCan you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |