motiondivision / motiondivision/motion

[BUG] Animation "jumping" with `AnimationPlaybackControls` use when `delay` greater than `0`.

Open
#2,500 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
33.7k
Forks
1.4k
Avg merge
1d 10h
Merged PRs (30d)
14

Description

1. Read FAQs ✅

2. Describe the bug

Elements animated with useAnimate whilst employing AnimationPlaybackControls causes "jumping" of animation position when delay is greater than 0 in the animate invocation.

3. CodeSandbox Reproduction

Edit framer-motion-repro

4. Steps to reproduce

  1. Employ useAnimate hook.
  2. Store AnimationPlaybackControls in reference
  3. Trigger animation controls with mouse events in scoped component.
  4. Add a delay in the animate invocation.
  5. Observe how the animation "jumps" back in time rather than strictly pausing and resuming.

5. Expected behavior

AnimationPlaybackControls control the animation progress including delays. There is no "jumping".

6. Video or screenshots

https://github.com/framer/motion/assets/29780384/4e3beb02-53fb-4bf4-b73f-b1f2ea5e67f7

7. Environment details
Opera 106 on macOS (Catalina)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodeSandbox reproduction and trace the useAnimate flow where AnimationPlaybackControls are stored and resumed after mouse events. Reproduce the delayed animation behavior, then verify that pausing and resuming preserves its position without jumping backward.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.