Skip to content

Hydration sometimes causes static elements to be recreated rather than attached, causing animations to rerun #8209

@fnimick

Description

@fnimick

Describe the bug

Some combinations of elements causes hydration to recreate a static element, causing animations to rerun.

I have provided the minimal example that I can produce. Changing any of the elements of this example causes the failure to no longer occur.

Reproduction

https://stackblitz.com/edit/sveltejs-kit-template-default-m8q8da?file=src%2Froutes%2F%2Bpage.svelte

Logs

No response

System Info

System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 75.61 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
  Browsers:
    Chrome: 109.0.5414.87
    Firefox: 103.0.1
    Safari: 16.2
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0 => 1.0.1 
    @sveltejs/kit: ^1.0.0 => 1.1.3 
    svelte: ^3.54.0 => 3.55.1 
    vite: ^4.0.0 => 4.0.4 

Severity

serious, but I can work around it

Additional Information

No response

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