You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! So this falls out of a weird but consistent browser behavior from code that calls window.getComputedStyle() before the transition starts for any newly mounted elements. This includes for any element in the tree of the one that is transitioned. I explained a bit about this here: #2557 (comment). We did discover somewhat of a workaround for this that we implemented for v2 of @headlessui/react which I'm going to look into implementing / back porting for both React and Vue in v1.7.x if possible.
In the meantime, there is a workaround you can implement in your own projects to get around this. It requires storing some state to delay the mounting of the button by one frame. The reason is that the button has the v-auto-animate directive which is the thing that calls window.getComputedStyle(…).
Appreciate your thorough explanation! I picked v1.7.21 purely for the purporse of the reproduction. However, I am actually using the insiders version :)
What package within Headless UI are you using?
@headlessui/vue
What version of that package are you using?
For example: v1.7.21
What browser are you using?
n/a
Reproduction URL
https://codesandbox.io/p/devbox/immutable-tdd-6qrmks?embed=1&file=%2Fsrc%2FApp.vue
Describe your issue
Observe how the
v-auto-animate
directive breaks the dialog panel's enter transition.The text was updated successfully, but these errors were encountered: