-
Notifications
You must be signed in to change notification settings - Fork 621
Event for restoration visits? #230
Comments
The |
use |
This issue has been duplicated by #264, where there is a bit more discussion on the topic. Turbolinks restoration visits depend on the |
@domchristie Thanks for the tip about saving form values into a session storage. I ended up saving the form values into the local storage so it can survive page unloading, with a custom implementation for record versioning and expiration. If anybody is interested in the implementation, you can grab it here. Previously I had a solution around page unload and turbolinks:before-visit, and the app showed an ugly mix of default browser and custom dialogs, but it could not handle the back and forward buttons. With the saving of values into the local storage, this "dialogs" solution feels pretty lame. |
I have a wysiwyg editor on a web page. If the user forgot to save their changes, and they navigate away, I want to prompt them that they have unsaved changes. If they click on other links, I can intercept it with
tubolinks:before-visit
. However, I cannot find any events that are fired before a restoration visit (back or forward button on the browser).Are there solutions for this? If not are there plans to add something like
turbolinks:before-restore
?The text was updated successfully, but these errors were encountered: