emilkowalski / vaul

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

Bad animation when clicking escape immediately on open #464

Closed Multinite closed 1 month ago

Multinite commented 1 month ago

The closing animation is not accurate to the current position of the component. Meaning if you click escape to close the component the moment it's opening, it causes the animation to "jump", rather than smoothly closing.

https://github.com/user-attachments/assets/36e430e7-53d9-4134-a99d-e5cf7f011461

emilkowalski commented 1 month ago

It's because it's using keyframes instead of transitions. A large refactor would be required to fix it, so I won't do it as it's an edge case anyway. Thanks for reporting though!