Skip to content

Local transitions playing on unmount since 5.38.3 #16826

@ed-tech-jim

Description

@ed-tech-jim

Describe the bug

When a component has a transition inside an #if block, the out transition will play when the component is unmounted, delaying the component unmount, even if specified as local

From @7nik on bluesky:

"Seems to be caused by github.com/sveltejs/sve... and the fact that the if condition is in fact static."

Reproduction

https://svelte.dev/playground/20daa9fc7f1740f89fb76099f14c51ae?version=latest

Logs

System Info

System:
    OS: macOS 15.6.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 103.92 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.18.0 - ~/.nvm/versions/node/v22.18.0/bin/node
    npm: 10.9.3 - ~/.nvm/versions/node/v22.18.0/bin/npm
    pnpm: 10.14.0 - ~/.nvm/versions/node/v22.18.0/bin/pnpm
  Browsers:
    Chrome: 140.0.7339.207
    Safari: 18.6
  npmPackages:
    svelte: ^5.39.5 => 5.39.5

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions