Comments (6)
I'll take a look at this - as a side note I'd recommend using x
and y
values to animate for improved performance.
from motion.
I've made a reproduction here https://codesandbox.io/s/framer-motion-bug-demo-rv5e2
It seems ok to me? Could you fork and amend to reproduce the bug?
from motion.
Thank you for taking the time to help.
Right now, I am not sure how to replicate it because it depends on certain factors to emerge - if I knew those factors, I might be able to resolve it myself. If I knew more about the expected behavior, I might be able to look for various conditions that might affect it. I am using this method for basically all of my page transitions. Most pages animate in on load just fine. However, a subset of them exhibit this issue - and this only happens when the page is reloaded. Intra-page transitions work just fine. I cannot figure out what makes the pages that exhibit this behavior different from the rest, as I have most things standardized across pages.
I'll keep trying to figure it out.
from motion.
Ok, I have managed to find the difference between pages that determines whether this happens or not, but I am not sure what to make of it.
Basically, nested a couple levels within the animated div, there is another div (flex) that can have 1 or 2 elements within it. When it only has 1 element, the page loads fine. When it has 2 elements within it, this problem occurs. I have not yet figured out anything else that affects it other than the presence of this element. I have played around with margins, padding, box sizing with all of the child elements and no adjustment seems to be able to affect it. None of the elements have margin or padding that extend beyond the bounds of the div. There is no special positioning going on inside the div.
The only other thing I can think of that might be affecting it is that there IS another animated div nested deep within the problematic one. However, it animates the right margin of that div, not the left, and uses different variant names to trigger. And the animation for that one is on exit.
from motion.
from motion.
Closed for inactivity
from motion.
Related Issues (20)
- [BUG] It isn't possible to animate the `x` and `y` coordinates of an SVG element using `animate` HOT 1
- [BUG] Framer Motion Animation doesn't work on reload without delay HOT 6
- [BUG] LazyMotion sets `initial` immediately; before `LazyMotion.features` load
- [BUG] with new version 11.0.24 HOT 3
- [FEATURE] Expose moved item index in Reorder.group
- ref prop does not work on div directly inside AnimatePresence with mode="popLayout" [BUG] HOT 1
- how to jump to specific position in animation sequence?
- [BUG] ScaleZ doesn't get applied to the motion component
- [BUG] problems with useMotionValue and useSpring to make an object follow the cursor after v11.
- [BUG] RotateZ not working in Shared Layout Animation HOT 2
- [BUG] v11 breaks all animations using vh and dvh as css unit HOT 1
- [BUG] v11 regression when cloning `motion` components HOT 2
- [BUG] Blinking on Enter and Exit Animations with layoutId and AnimatePresence
- [BUG] AnimatePresence - enter and exit animations are mixed when they alternate rapidly HOT 5
- [BUG] When resizing a canvas with a LayoutCamera, pointer events on meshes are aligned incorrectly.
- [BUG] Elements do not animate in latest React 19 canaries HOT 6
- [BUG] ReferenceError: React is not defined Just by importing framer-motion HOT 3
- [BUG] Docs: Application error: a client-side exception has occurred (see the browser console for more information). HOT 1
- [BUG] Property '$$typeof' is missing in `ForwardRefComponent` HOT 2
- [BUG] Next.js render error when first loaded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from motion.