Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Animating already exiting elements causes them not to unmount #2673

Closed
WerdoxDev opened this issue May 17, 2024 · 3 comments · Fixed by #2741
Closed

[BUG] Animating already exiting elements causes them not to unmount #2673

WerdoxDev opened this issue May 17, 2024 · 3 comments · Fixed by #2741
Labels
bug Something isn't working

Comments

@WerdoxDev
Copy link

1. Read the FAQs 👇
done
2. Describe the bug

Lets say we have a swap animation using AnimatePresence and it animates the swapping of 2 divs.
now when div a is entering and div b is exiting and I trigger the swapping again, it forgets to remove the now exiting div a.
or sometimes it works correctly but the next time triggering the animation both elements show up at the same time.

3. IMPORTANT: Provide a CodeSandbox reproduction of the bug

https://codesandbox.io/p/sandbox/framer-motion-bug-rmgdpz

4. Steps to reproduce

Click "change"
Then click it again while both elements are animating.
It all breaks

5. Expected behaviour

Simply exit and unmount the exited element

@WerdoxDev WerdoxDev added the bug Something isn't working label May 17, 2024
@quentinlagache
Copy link

quentinlagache commented May 19, 2024

Bug related to the opacity property since version 11.0.11.
Duplicate issue of: #2618 #2554 #2416

Would be great for @mattgperry to be able to look into it 🙏

@pklada
Copy link

pklada commented May 28, 2024

Pls 🙏

@FlashLim
Copy link

I am too facing the problem, regardless of opacity property.

Version: 11.3.12
I have tried AnimatePresence with popLayout, wait and sync with nested component property x or y or scale or width or height.
The nested component in AnimatePresence did not unmount.

I went for Version 11.0.10 fix the problem temporary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants