motiondivision / motiondivision/motion
[BUG] Drag constraints change unexpectedly when in certain states
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 33.7k
- Forks
- 1.4k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 14
Description
1. Read the FAQs 👇
2. Describe the bug
Give a clear and concise description of what the bug is.
Certain animation states seem to mess with the effective drag constraints. It is best explained by the code sandbox link below.
Basically, i should be able to drag the box any where within the specified drag constraints in all states. But under certain conditions the effective drag constraints applied by framer motion is different from what is specified.
Those edge cases seems to be triggered by states that set properties such as width.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/p/sandbox/framer-motion-drag-reset-attempt-forked-pcthq9
4. Steps to reproduce
Steps to reproduce the behavior:
- Go to the linked Code Sand box and follow the instructions on screen.
5. Expected behavior
Drag constraints are consistently applied in all states.
6. Video or screenshots
Video recording: https://drive.google.com/file/d/1UwgWnUmrQ5kCBfA344MlmwDCn0qB9cSk/view?usp=sharing
7. Environment details
If applicable, let us know which OS, browser, browser version etc you're using.
Mac / Chrome
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction and follow its on-screen instructions in Chrome to observe how drag constraints change across animation states. Inspect the drag-constraint behavior around states that set properties such as width; done means the specified constraints remain consistently effective in every state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100