question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Crossfade Spring transition with duration flickers back to initial state at end

See original GitHub issue

This cropped up in #1023 , but appears to be a separate issue. Here’s a recording:

https://user-images.githubusercontent.com/159500/113273257-c3c72200-92dc-11eb-8fa7-fde2309a87a0.mov

CodeSandbox reproduction of the bug

https://codesandbox.io/s/framer-motion-330-issue-with-layout-animations-forked-xjz75?file=/src/App.js

After some trial and error, I see that it strongly depends on the type of transition:

Works:

const transition = {
  type: "spring",
  stiffness: 400,
  damping: 50
};

Also works:

const transition = {
  duration: 1
};

Doesn’t work:

const transition = {
  type: "spring",
  duration: 1
};

This is not a new issue by the way, I found it happens in framer-motion@3.3.0 as well, so it’s probably not related to layout projection but to transition calculations.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
mattgperrycommented, Apr 1, 2021

Hmm probably not at the moment, good point. For the border radius it’s just more predictable to always get it from the same place, the internal motion values, rather than measuring from the Dom

1reaction
mattgperrycommented, Apr 1, 2021

It is related to the crossfader by the looks of it, I’ll take a look next week tho

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transitions Not Working in DaVinci Resolve 16, 17 ... - YouTube
What do you do when transitions are not working in DaVinci Resolve 16? This a very common problem that has an easy solution....
Read more >
CSS3 transition/transform/translate3d causes severe flicker on ...
When the animation ends, the bottom photo ends at opacity=1.0, the top two at opacity=0.0. (That should be their final state).
Read more >
Reveal or hide a view using animation - Android Developers
Crossfade animations (also known as dissolve) gradually fade out one View or ViewGroup while simultaneously fading in another. This animation is ...
Read more >
React: Using React-Spring To Animate Crossfading Images
The d3.transition used to fadein the park images felt somewhat choppy. The reason being is that it just replaced the previous background image...
Read more >
ThR - River Thames Conditions - Environment Agency - GOV.UK
Wohnen im container grundriss, Kent state ohio university basketball, Tolton family literacy center, Lokvarka w gorskim kotarze, Guillermo javier sesma, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found