You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using layoutId to animate cards into a fullscreen view.
When interacting at normal speed, everything works correctly:
Opening animates from the clicked card → fullscreen
Closing animates fullscreen → back to the correct card position
The animation always uses the correct origin and destination
However, when clicking different cards very quickly, the shared layout animation becomes incorrect:
The first click always opens from the correct card
But on rapid subsequent clicks:
The fullscreen animation may open from the wrong card position
Or closing may animate back to a card that was clicked several interactions earlier
The wrong origin is not always the immediately previous card ... sometimes it’s 2–3 cards earlier
This only happens during fast interactions.
At normal clicking speed, the animations behave correctly.
It seems like motion/react is using a stale layout snapshot when rapid state changes occur, causing shared layout transitions to pair with the wrong element.
what is going on here?
Expected behavior
Shared layout transitions should always animate from and back to the correct element, regardless of interaction speed.