Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

[Bug] AnimationControls.finished promise stays pending if it's not immediately used #260

Description

@piotrjoniec

1. Describe the bug

The AnimationControls.finished promise stays pending if it's not immediately used after creating the animation. If I await this promise after the animation has already finished, it will await forever, which is unlike the normal behavior of the "finished" promise in WAAPI.

2. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/p/devbox/motionone-bug-k37tnt?file=%2Fsrc%2Findex.mjs

3. Steps to reproduce

  1. Open the CodeSandbox link.
  2. Open the console.

4. Expected behavior

Console should show all "Case 1 finished", "Case 2 finished" and "Case 3 finished".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBug report

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions