emilkowalski / vaul

A drawer component for React.
https://vaul.emilkowal.ski
MIT License
6.45k stars 215 forks source link

fix: don't animate initially if defaultOpen is set to true #488

Closed emilkowalski closed 1 month ago

freddieerg commented 1 month ago

Hi, I believe this has potentially added another issue where the animation is happening after change the page width. After loading, if I then pull the page in from the side, I'm seeing the animation fire. Is anyone else experiencing this?

After investigating it seems the issue is that when you change the window size it causes data-vaul-animate to become true, this of course then fires what it thinks is the relevant animation.