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

JavaScript exit animations aren't properly supported #1160

Open
atomiks opened this issue Dec 18, 2024 · 2 comments · May be fixed by #1236
Open

JavaScript exit animations aren't properly supported #1160

atomiks opened this issue Dec 18, 2024 · 2 comments · May be fixed by #1236
Labels
bug 🐛 Something doesn't work

Comments

@atomiks
Copy link
Contributor

atomiks commented Dec 18, 2024

With keepMounted + AnimatePresence in (Framer) Motion, node.getAnimations() detects opacity transitions, but not transform:

This won't work, with the element unmounting instantly:

<motion.div exit={{ x: '-100%' }} />

This does however:

<motion.div exit={{ x: '-100%', opacity: 0.9999 }} />

Possible solution

A new value for keepMounted, such as keepMounted="controlled", indicating the element's mounting is being controlled by another component like AnimatePresence. This will prevent hidden from being added, and remove the disabled prop from FocusManager.

@atomiks atomiks added the bug 🐛 Something doesn't work label Dec 18, 2024
@vladmoroz
Copy link
Contributor

remove the disabled prop from FocusManager

What does disabled do exactly?

@atomiks
Copy link
Contributor Author

atomiks commented Dec 19, 2024

@vladmoroz makes all focus management inert with keepMounted=true. If another library is doing conditional rendering, then this is not necessary since it uses regular component mounting to enable/disable it.

@atomiks atomiks linked a pull request Dec 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants