[Firefox]: Close animations funky when closing multiple toasts
Describe the bug
Say you have 4 open toasts; closing them, starting from the one at the bottom, causes the rest to have "funky" animations as they fall back into place.
Reproduction
https://stackblitz.com/github/shyakadavis/svelte-sonner-repro
Logs
System Info
System:
OS: macOS 15.4.1
CPU: (8) arm64 Apple M2
Memory: 73.44 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - /usr/local/bin/node
npm: 10.9.2 - /usr/local/bin/npm
pnpm: 10.10.0 - ~/Library/pnpm/pnpm
Browsers:
Chrome: 134.0.6998.118
Safari: 18.4
npmPackages:
@sveltejs/kit: ^2.21.0 => 2.21.0
svelte: ^5.28.6 => 5.28.6
svelte-sonner: ^1.0.1 => 1.0.1
Severity
annoyance
Would you mind dropping a video of what you're referring to?
There were some subtle changes made to the original sonner animations/transitions that we've adopted here but want to confirm which specific behavior you're referring to.
https://github.com/user-attachments/assets/0b2a6b90-e1c8-4ccd-af48-c927ad4cb7d2
Here you go, @huntabyte
After much suspicion, here comes the dread - Firefox. 😢 😂
Chrome is good, Firefox, as always, begs to differ. 😂
Is this reproducible with the original as well? @shyakadavis
Is this reproducible with the original as well? @shyakadavis
Not on my end. The animations are graceful at https://sonner.emilkowal.ski/ @huntabyte
I will look into this tomorrow 😃
This appears to be being cause because firefox triggers a mouseleave event even if your mouse doesn't move. Looking into this further.