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

transitionend event isn't fired on element inside <transition> when leaving #8698

Open
guanzo opened this issue Aug 23, 2018 · 3 comments
Open

Comments

@guanzo
Copy link

guanzo commented Aug 23, 2018

Version

2.5.17

Reproduction link

https://jsfiddle.net/guanzo/xcLk083u/1/

Steps to reproduce

  1. Open reproduction demo in a non-Chrome browser.
  2. Attach transitionend listener to the component root $el. (It can be on any element, doesn't matter)
  3. Transition out a child element with <transition> and v-if.
  4. Listener callback isn't fired.

What is expected?

The transitionend event is fired in all browsers.

What is actually happening?

The transitionend event is only fired in Chrome.


My use case does NOT allow me to use the template, therefore I cannot use the javascript hooks, such as leave and afterLeave. Regardless, this is inconsistent behavior and should be figured out. Is vue stopping the propagation of the event somehow?

For a complete context of the use case, read this issue: guanzo/vue-smooth-reflow#3

@KaelWD
Copy link
Contributor

KaelWD commented Aug 23, 2018

Doesn't show for me in chrome either, v68.0.3440.106 on windows 10. Adding mode="out-in" fixes it for chrome, but not firefox or edge.

@guanzo
Copy link
Author

guanzo commented Aug 23, 2018

Weird. Works for me, v68.0.3440.106 (Official Build) (64-bit) on windows 10.

@posva posva changed the title transitionend event isn't fired with <transition> and v-if on non-Chrome browser. transitionend event isn't fired on element inside <transition> when leaving Aug 23, 2018
@posva
Copy link
Member

posva commented Aug 23, 2018

Seems to be related to the element being removed from the dom

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

No branches or pull requests

4 participants