framer / motion

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

ref prop does not work on div directly inside AnimatePresence with mode="popLayout" [BUG] #2604

Open saltnpixels opened 1 month ago

saltnpixels commented 1 month ago

1. Read the FAQs 👇

2. Describe the bug ref prop does not work on the div directly inside AnimatePresence with mode="popLayout" The ref always comes back undefined.

leonsbuddydave commented 1 month ago

Seeing this same issue with a motion.video inside of AnimatePresence; the ref callback is never called. Setting mode to sync correctly sets the ref.

EDIT: This is on 11.0.6