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

Transition events are being dispatched multiple times #2252

Closed
amiranagram opened this issue Feb 4, 2023 · 2 comments · Fixed by #2267
Closed

Transition events are being dispatched multiple times #2252

amiranagram opened this issue Feb 4, 2023 · 2 comments · Fixed by #2267
Assignees

Comments

@amiranagram
Copy link

amiranagram commented Feb 4, 2023

What package within Headless UI are you using?

@headlessui/vue

What version of that package are you using?

v1.7.9

What browser are you using?

Chromium / Firefox

Reproduction URL

https://codesandbox.io/p/sandbox/pensive-lake-wquxcm

Describe your issue

Transition events when listened on the TransitionRoot component are being dispatched multiple times. 1 from the component itself, and each time a TransitionChild component is used inside a TransitionRoot.

Check the console of my code sandbox, where I logged what happens with after-leave event.

@zipper
Copy link

zipper commented Feb 7, 2023

I have a similar issue, more over half of the afterLeave (or afterEnter) events are triggered instantly, second half (those from TransitionChild elements) are properly delayed according to transition class used. I actually have 4 events for 1 TransitionRoot with 2 TransitionChild.

@thecrypticace
Copy link
Contributor

This should be fixed (via #2267), and will be available in the next release.

You can already try it using npm install @headlessui/vue@insiders.
This should be fixed, and will be available in the next release.

@zipper Can you open a separate issue with a reproduction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants