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
Open Demo.xcodeproj and change Demo.current to return local
Run the app and tap "Load a web page modally"
Tap "Submit form"
The form dismisses
Expected behavior
One request is made to /success
Actual behavior
Two requests are made to /success
➜ turbo-native-demo git:(main) npx nodemon
[nodemon] 2.0.22
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node server.js`
Server is listening on port 45678
Thu Feb 29 2024 05:02:56 GMT-0800 (Pacific Standard Time) -- GET /
Thu Feb 29 2024 05:02:57 GMT-0800 (Pacific Standard Time) -- GET /npm/@hotwired/[email protected]/+esm
Thu Feb 29 2024 05:03:01 GMT-0800 (Pacific Standard Time) -- GET /new
Thu Feb 29 2024 05:03:01 GMT-0800 (Pacific Standard Time) -- GET /npm/@hotwired/[email protected]/+esm
Thu Feb 29 2024 05:03:11 GMT-0800 (Pacific Standard Time) -- POST /new
Thu Feb 29 2024 05:03:11 GMT-0800 (Pacific Standard Time) -- GET /success
Thu Feb 29 2024 05:03:11 GMT-0800 (Pacific Standard Time) -- GET /success
If the /success page were to show a confirmation flash message via a Rails flash, then the user would never see it. The first request would "eat" it and it would never be shown on the second one.
Session seems to think this request is the user navigating "backwards", the second request triggering from this line:
extensionSession:VisitableDelegate{publicfunc visitableViewWillAppear(_ visitable:Visitable){
guard let topmostVisit =self.topmostVisit,let currentVisit =self.currentVisit else{return}
if visitable === topmostVisit.visitable && visitable.visitableViewController.isMovingToParent {
// Back swipe gesture canceled
if topmostVisit.state ==.completed {
currentVisit.cancel()}else{visit(visitable, action:.advance)}}else if visitable === currentVisit.visitable && currentVisit.state ==.started {
// Navigating forward - complete navigation early
completeNavigationForCurrentVisit()}else if visitable !== topmostVisit.visitable {
// Navigating backward
visit(visitable, action:.restore) // THIS LINE
}}}
When submitting a form in a modal the redirected to page is requested twice.
Demo.current
to returnlocal
Expected behavior
/success
Actual behavior
/success
If the
/success
page were to show a confirmation flash message via a Rails flash, then the user would never see it. The first request would "eat" it and it would never be shown on the second one.Session
seems to think this request is the user navigating "backwards", the second request triggering from this line:This issue is fixed via #155.
The text was updated successfully, but these errors were encountered: