solidjs-community / solid-transition-group

SolidJS components for applying animations when children elements enter or leave the DOM.
https://solid-transition-group.netlify.app
MIT License
254 stars 14 forks source link

ensure transition will fire when using classes #9

Closed kirpalmakanga closed 3 years ago

kirpalmakanga commented 3 years ago

Hello,

I've noticed that sometimes on Firefox, although requesting a new frame, the enter- and enter-active- classes are instantly overwritten, thus not triggering the transition.

Vue's transition utility has a helper that calls requestAnimationFrame twice before firing a callback so I've tried to apply that method to your component and it fixed the issue.

Let me know what you think of it.

PS: Solid is a great library, keep up the good work !