motiondivision / motiondivision/motion
[BUG] Framer Motion Animation doesn't work on reload without delay
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
If I have two components that should be animated as soon as they are visible, they will not be animated when I reload the page with CTRL + R. Only when I reload the page with CTRL + SHIFT + R the animation appears.
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
Unfortunately I couldn't reproduce the bug in CodeSandbox because the reload mechanism seems to work differently there, but the bug is also there in Stackblitz.
https://stackblitz.com/edit/vitejs-vite-cbkvjz?file=src%2FApp.jsx&terminal=dev
4. Steps to reproduce
Steps to reproduce the behavior:
- Open https://stackblitz.com/edit/vitejs-vite-cbkvjz?file=src%2FApp.jsx&terminal=dev
and then https://vitejsvitecbkvjz-evfn--5173--134daa3c.local-credentialless.webcontainer.io/ (the second url is just the fullscreen version) - In the second url click on connect project after a few seconds
- Press
CTRL + Ror click on the reload button of your browser - The animation doesn't really work
If you press
CTRL + SHIFT + R, the animation will work fine.
5. Expected behavior
When I reload the page the animation should run normally, even without shift.
6. Video or screenshots
---
7. Environment details
Windows 11 23H2; Chrome 123.0.6312.59
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 StackBlitz reproduction and compare a normal browser reload with Ctrl+Shift+R in the fullscreen page. Investigate why the animation fails after Ctrl+R on the reported Windows 11 and Chrome environment. Done means the animation runs normally after a standard reload; no source file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, vite
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100