svelte-sonner icon indicating copy to clipboard operation
svelte-sonner copied to clipboard

[Firefox]: Close animations funky when closing multiple toasts

Open shyakadavis opened this issue 11 months ago • 6 comments

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

shyakadavis avatar May 13 '25 09:05 shyakadavis

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.

huntabyte avatar May 13 '25 13:05 huntabyte

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. 😂

shyakadavis avatar May 13 '25 16:05 shyakadavis

Is this reproducible with the original as well? @shyakadavis

huntabyte avatar May 17 '25 22:05 huntabyte

Is this reproducible with the original as well? @shyakadavis

Not on my end. The animations are graceful at https://sonner.emilkowal.ski/ @huntabyte

shyakadavis avatar May 17 '25 22:05 shyakadavis

I will look into this tomorrow 😃

huntabyte avatar May 24 '25 03:05 huntabyte

This appears to be being cause because firefox triggers a mouseleave event even if your mouse doesn't move. Looking into this further.

huntabyte avatar Jun 11 '25 00:06 huntabyte