Describe the bug
The first time a Layer (produced by useLayer) is toggled/triggered open, it doesn't correctly transition from the framer-motion initial state to the animate state (it gets stuck in initial).
It looks like this issue is unique to framer-motion@4.1.13, and could be related to this commit
In the console you can see that isOpen is being toggled true/false
But the first isOpen doesn't properly animate between the initial and animate state
Only when isOpen has been toggled to false, then back to true does the animation work (i.e. 3 clicks needed)
The second button shows that regular framer animations still work just fine on first click
Expected behavior
Clicking on the trigger element should open Layer on first go, not require 3 clicks
Browser / OS (please complete the following information):
OS: Windows
Browser: tested on Chrome v90.0 and Firefox v89.0
Additional context
Given the regular framer example works, I assume this is a laag/framer-motion interaction. But if it's better to post this on framer-motion, then let me know
Describe the bug The first time a Layer (produced by
useLayer
) is toggled/triggered open, it doesn't correctly transition from the framer-motioninitial
state to theanimate
state (it gets stuck ininitial
).It looks like this issue is unique to
framer-motion@4.1.13
, and could be related to this commitTo Reproduce Steps to reproduce the behavior:
isOpen
is being toggledtrue
/false
isOpen
doesn't properly animate between theinitial
andanimate
stateisOpen
has been toggled tofalse
, then back totrue
does the animation work (i.e. 3 clicks needed)Expected behavior Clicking on the trigger element should open Layer on first go, not require 3 clicks
Browser / OS (please complete the following information):
Additional context Given the regular framer example works, I assume this is a laag/framer-motion interaction. But if it's better to post this on framer-motion, then let me know