Using redirects with the new location storage.

This example defines 2 routes, #/link and #/form ... both of which execute a redirect to #/test_route

When #/link route triggers the redirect, the behavior is as expected every time. And when I look in console I can see setLocation being called twice as I'd expect.

When #/form route triggers the redirect, the behavior seems inconsistent.

The first form submit is successful, the redirect occurs and the body of the #/test_route executes. BUT! looking in console, we see setLocation only being called once for the #/test_route/ and not at all for the #/form route preceeding it.

Because #/test_route was the last location set, and because the #/form route never did a setLocation anyway, repeated clicks to submit the form will not be heard.

I kind of expect that when a form submission is caught it will trigger a Setlocation ... but looking in _checkFormSubmission, i see that the form routes are manually run here via runRoute, bypassing setLocation entirely!

Any thoughts on this? I know that recording app state via data attributes isn't a core feature of sammy, but I'm curious to hear if you think caught form submits should still bypass setLocation etc.

Results