Open elsurudo opened 4 months ago
Reminds me of https://github.com/hotwired/turbo/issues/1083#issuecomment-2145264451
Is morphing enabled?
Morphing is indeed enabled, and it does seem related to that thread.
The solutions in that thread didn't work for me, although I was able to get around the issue by adding a "dummy" param (for example success=true
) to the path I redirect to to force the disconnect/reconnect. It's a bit ugly, but at least works for now.
Still, this was pretty surprising behaviour, so it would be nice to have a better, "sanctioned" solution to this.
This also impacts the following (quite common I imagine?) use-case:
Hello,
Basically as the title says: after a Turbo form submission, if I redirect to the same page then the Stimulus lifecycle events don't fire. Any new Stimulus controllers that are in the redirected-to page don't have their
connect
methods called, and hence they don't initialize.Is it a bug, or expected behaviour? And is there a workaround?