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

[Bug] .reverse() not working #200

Open
TeddyLourson opened this issue Jun 25, 2023 · 1 comment
Open

[Bug] .reverse() not working #200

TeddyLourson opened this issue Jun 25, 2023 · 1 comment
Labels
Bug Bug report

Comments

@TeddyLourson
Copy link

1. Describe the bug

Calling .reverse() on an AnimationControls instance with a ProgressFunction never plays in reverse.


2. IMPORTANT: Provide a CodeSandbox reproduction of the bug

The code to look at is located under :

  • src/components/progress.tsx
  • src/hooks/use-motion-value.tsx

Framework used : Qwik

👉 CodeSandbox : motion-one-reverse


3. Steps to reproduce

  1. Click on the grey bar.
  2. Click on the bar again.

4. Expected behavior

On the first click (when the bar is grey) :
The red bar should animate to fill up the grey bar.

On the second click (when the bar is red) :
The red bar should animate to shrink to a width of 0.


5. Note

I'm using the Qwik framework and didn't try with any other framework or vanilla Js so maybe that's an issue with Qwik or my knowledge about it (in the sandbox and for my project).

@TeddyLourson TeddyLourson added the Bug Bug report label Jun 25, 2023
@TeddyLourson
Copy link
Author

I tried in React (without any wrapper) and it doesn't work either.
Here are the codesandbox links for :
React : CodeSandbox
Qwik : CodeSandbox

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Bug report
Projects
None yet
Development

No branches or pull requests

1 participant