-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reload page if failed form changes tracked content (#759)
When a form submission fails with a client error, the response from the form replaces the current page content. In Turbo 7.1.x, whenever this replacement would affect resources marked with `data-turbo-track="reload"`, a reload of the page is triggered instead. In 7.2.0, we do not perform this reload. Instead, the form's response is discarded. This difference can affect situations like expired sessions, where the previous behaviour of reloading the page would cause a new session to be established. If we instead allow the response to be discarded, actions can fail silently. This commit changes the behaviour to reload the current page when `reload` is called outside of a current visit, in order to match the behaviour of 7.1, and to not discard the response from the form submission.
- Loading branch information
1 parent
b3facd8
commit 728a561
Showing
4 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters