Skip to content

Svelte spring store continuously adding values when switching tabs  #9141

@eriksachse

Description

@eriksachse

Describe the bug

When a spring animation is in progress and the user switches tabs in Chrome, an unexpected behavior occurs where the spring value is continuously applied to the associated element. Subsequently, upon returning to the original page, the spring animation plays back at an accelerated pace. For visual reference, I have attached a video demonstrating this issue.

Reproduction

https://svelte.dev/repl/6807679be5754699814ba39af6c6c9be?version=4.2.0

Screen.Recording.2023-08-23.at.13.30.38.mov

Logs

No response

System Info

System:
    OS: macOS 13.4
    CPU: (8) arm64 Apple M1 Pro
    Memory: 181.75 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.16.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.11.0 - /usr/local/bin/npm
    pnpm: 7.17.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 116.0.5845.110
    Edge: 114.0.1823.55
    Safari: 16.5

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