Closed kylesloper closed 2 years ago
Thanks @kylesloper! Nice observation. It certainly makes sense that a visit to the current location doesn't trigger an animation. Calling preventDefault
on turbo:before-visit
will cancel the visit entirely, which may not be the desired behaviour. For example, when a user wants to reload the current page by tapping a link, this will prevent them from doing so.
I'm considering an API for conditionally switching off animations, so I'll bear this in mind. Thanks again :)
Totally believe this is personal choice but with heavy page transitions on load, disabling Turbo/Turn if the page requested is the current page is best for UX and helping the site feel more app-like.
Love the project <3