-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
We are using layoutId to animate a current link indicator in our navbar (using fixed positioning) in a Next.js app. The animation works as expected during page navigation except when the page is scrolled. In that case, the initial position of the animation seems to be affected by the scroll offset. See this video:
framer-motion-issue.mov
Steps to reproduce
Steps to reproduce the behavior:
- Go to https://codesandbox.io/p/sandbox/adoring-albattani-qtdt3b?file=%2Fsrc%2FLayout.tsx
- Scroll the page
- Click on the "Page 1" link
- The animation is incorrect
Expected behavior
The animation should work regardless of the scroll.
Environment details
- MacOS 13.2.1
- Chromium 110, Firefox 110 and Safari 16.3
- framer-motion: 10.2.4
Similar issues
This issue seems similar to #1580 but I created a new one because I'm not fully sure that's the same issue. Feel free to tell me to close this one and comment there. 🙏
theodelebarre, yupi1, louisthomaspro, peksipatongeis, gielcobben and 15 moregielcobben, abimnyud, xbtmatt, TulioDR and keguigong
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working