fulcrologic / fulcro-rad

Fulcro Rapid Application Development
MIT License
201 stars 46 forks source link

fix: completion-fn called twice in will-enter on initial page load #124

Closed yenda closed 7 months ago

yenda commented 7 months ago

At least on Chrome, the browser sends an initial pop state event that has no state, and does not correspond to the expected forward or backward distinction handled by the pop-state-listener. As a result, installing the htlm5-history triggers a routing event, that is then immediatly followed by another when one restores the history, which is the common use case in RAD.

yenda commented 7 months ago

I also included a patch that I have been running in prod for a while that fixes another history related issue, where forms would not properly navigate after navigation has been initially interrupted because of unsaved changes