JavaScript exit animations aren't properly supported
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.
remove the
disabledprop fromFocusManager
What does disabled do exactly?
@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.