After upgrading our app from Turbo Native 7.0.2 to 7.1.0, I noticed some different behavior with forms that redirect to other URLs. What happens is if the new page has links on it, clicking those links just re-renders the current page. If you click again, then the new page is loaded. I tracked it down to this PR when it started happening.
I was able to replicate the issue using the turbo-native-demo fairly easily, you can see the commits or reference the diff below.
Reading the diff in #155, I can see why this new behavior is happening, but I don't understand why I would want this behavior. The PR references fixing some issue with flash alerts, and https://github.com/hotwired/turbo-ios/issues/186 is referenced too which also mentions issue with flash. In my debugging, I noticed that the code referenced in #186 is in fact still being hit, but on the second visit it picks up the "unprocessed visit options" from #155, so there is no actual second request, but it seems the problem stems from this quote in #186:
Session seems to think this request is the user navigating "backwards",
Is there some other way I should be structuring redirects or handle this issue?
After upgrading our app from Turbo Native 7.0.2 to 7.1.0, I noticed some different behavior with forms that redirect to other URLs. What happens is if the new page has links on it, clicking those links just re-renders the current page. If you click again, then the new page is loaded. I tracked it down to this PR when it started happening.
I was able to replicate the issue using the turbo-native-demo fairly easily, you can see the commits or reference the diff below.
Reading the diff in #155, I can see why this new behavior is happening, but I don't understand why I would want this behavior. The PR references fixing some issue with flash alerts, and https://github.com/hotwired/turbo-ios/issues/186 is referenced too which also mentions issue with flash. In my debugging, I noticed that the code referenced in #186 is in fact still being hit, but on the second visit it picks up the "unprocessed visit options" from #155, so there is no actual second request, but it seems the problem stems from this quote in #186:
Is there some other way I should be structuring redirects or handle this issue?
Here are some videos showing the difference:
Before
https://github.com/user-attachments/assets/0242f1f6-82fa-4cec-b62f-4d0226fc20de
After
https://github.com/user-attachments/assets/f6dfd8a6-e4b0-4836-8956-c7b458a960a5
Diff with my changes to turbo-native-demo that showcases the problem.