You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The router will not transition to the new route and will not call updateURL. All is good.
Unfortunately, for a URL transition, calling transition.abort() leaves the page in an inconsistent state. The router is acting because handleURL was called, which means the page is already at the new location (e.g. window.location.href has changed).
I'd really like some way of getting the page back to a consistent state. Some ideas:
createURLTransition sets transition.previousURL and transition.abort() calls updateURL with previousURL if it's defined
createURLTransition sets transition.previousURL, which afterModel can query and call updateURL as necessary
createURLTransition sets transition.isURLTransition, which afterModel can use to conditionally call window.history.back() after calling transition.abort()
The text was updated successfully, but these errors were encountered:
Considering the reporter (hi @jamesarosen!) I suspect that this likely was an issue. Given the report and my knowledge of how the sausage gets made This seems like it could reasonably still be an issue. However, it's entirely possible that @alexspeller's recent PR #197 addressed this.
A handler can abort a named transition as follows:
The router will not transition to the new route and will not call
updateURL
. All is good.Unfortunately, for a URL transition, calling
transition.abort()
leaves the page in an inconsistent state. The router is acting becausehandleURL
was called, which means the page is already at the new location (e.g.window.location.href
has changed).I'd really like some way of getting the page back to a consistent state. Some ideas:
createURLTransition
setstransition.previousURL
andtransition.abort()
callsupdateURL
withpreviousURL
if it's definedcreateURLTransition
setstransition.previousURL
, whichafterModel
can query and callupdateURL
as necessarycreateURLTransition
setstransition.isURLTransition
, whichafterModel
can use to conditionally callwindow.history.back()
after callingtransition.abort()
The text was updated successfully, but these errors were encountered: