Giter VIP home page Giter VIP logo

Comments (6)

mattgperry avatar mattgperry commented on May 29, 2024

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.

mattgperry avatar mattgperry commented on May 29, 2024

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.

agonsalves avatar agonsalves commented on May 29, 2024

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.

agonsalves avatar agonsalves commented on May 29, 2024

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.

mattgperry avatar mattgperry commented on May 29, 2024

from motion.

mattgperry avatar mattgperry commented on May 29, 2024

Closed for inactivity

from motion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.