Closed (fixed)
Project:
RefreshLess
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2023 at 21:46 UTC
Updated:
3 Mar 2024 at 15:19 UTC
Jump to comment: Most recent
At the time of writing, a redirect causes the turbo:before-render and turbo:render to trigger twice, which causes behaviours to detach, attach, detach, and attach again.
Click a redirect link with the browser dev tools console open, looking at debug messages we have in our JavaScript.
Doing a search for "redirect" in the Turbo issues yields a few results that seem to indicate this is a known problem with Turbo and not on our end:
turbo:visit is dispatched twice on redirectreplace visit on redirection (see comments)Work around it ourselves and/or wait for Turbo to implement a fix.
None other than hopefully no weird breaking due to double detach/attach.
None.
None.
Comments
Comment #2
ambient.impactComment #3
ambient.impactComment #4
ambient.impactComment #6
ambient.impactWorkaround has been committed and seems to work, so closing for now. We can reopen later if needed to refine it.
Comment #8
ambient.impactRe-opening because there are still edge cases that need to be fixed.
Comment #10
ambient.impactThis has been fixed in the above commit and seems to work reliably now. Will re-open if needed later.