domchristie / turn

📖 Animate page transitions in Turbo Drive apps
https://domchristie.github.io/turn/
MIT License
155 stars 7 forks source link

Failing turbo visits #1

Closed georgekettle closed 2 years ago

georgekettle commented 2 years ago

I found that when I added turn to my rails 7 project, it worked until page transitions were too quick. So I removed some classes on html element when initialising the Turn class instance.

And also added export default on the class in order to import it in my application.js

There may be a better solution to this, I'm just adding my contribution :)

export default class Turn { constructor (action) { // ... this.removeClasses('enter'); this.removeClasses('exit'); }

domchristie commented 2 years ago

Thanks @georgekettle! I've fixed this in https://github.com/domchristie/turn/commit/4fc5dd1fee5ca674ffd58a2796774d62cd4c45de.

georgekettle commented 1 year ago

Thanks so much @domchristie Great work on this project, it's been very helpful for me 👍