Skip to content

Transitions created by a transition function don't reverse correctly #16308

Open
@hgl

Description

@hgl

Describe the bug

If a transition, created by a transition function, is quickly reversed, animation breaks.

Reproduction

  1. go to https://svelte.dev/playground/23bcb97019b8434e87f24aeb2681f841?version=latest
  2. click toggle, wait for the box to start sliding down
  3. click toggle again quickly

the box should slide up and down smoothly, but it currently doesn't.

Logs

System Info

System:
    OS: macOS 15.5
    CPU: (12) arm64 Apple M2 Pro
    Memory: 60.95 MB / 32.00 GB
    Shell: 4.0.2 - /run/current-system/sw/bin/fish
  Binaries:
    Node: 24.1.0 - /nix/store/2q5an9rpdq4vhc5ag04ajxnzxxqsqchq-nodejs-24.1.0/bin/node
    npm: 11.3.0 - /nix/store/2q5an9rpdq4vhc5ag04ajxnzxxqsqchq-nodejs-24.1.0/bin/npm
    pnpm: 10.12.4 - /nix/store/y8hp276c80y9iprnisygix42h96qf9hg-pnpm-10.12.4/bin/pnpm
  Browsers:
    Chrome: 137.0.7151.120
    Safari: 18.5
    Safari Technology Preview: 26.0
  npmPackages:
    svelte: ^5.0.0 => 5.34.8

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions