framer / motion

Open source, production-ready animation and gesture library for React
https://framer.com/motion
MIT License
22.73k stars 755 forks source link

[BUG] The animation breaks when quickly switching between tabs #2684

Open dmnlgn opened 1 month ago

dmnlgn commented 1 month ago

1. Describe the bug

If I switch the tab to another one and quickly switch back to the previous one, then 'exit' does not run and all the contents inside the tab do not show up

2. IMPORTANT: Provide a CodeSandbox reproduction of the bug https://codesandbox.io/p/sandbox/framer-motion-layout-animations-forked-x772fv

3. Steps to reproduce

If you are on 'Tomato' tab, then click tab 'Lettuce' and then quickly click 'Tomato' tab again

5. Expected behavior

The animation must be completed correctly and the content must always be shown

6. Video or screenshots

https://github.com/framer/motion/assets/58575721/d358ad35-81c7-416c-af13-9975c63e89d8

"framer-motion": "11.2.6",

pklada commented 1 month ago

Looks like this bug: https://github.com/framer/motion/issues/2554