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

Custom directive "inserted" hook doesn't fire when transition is used on binded element #6076

Closed
DominikSerafin opened this issue Jul 12, 2017 · 0 comments
Labels

Comments

@DominikSerafin
Copy link

Version

2.3.4

Reproduction link

https://jsfiddle.net/aL1dgdc8/11/

Steps to reproduce

  1. Create custom directive that uses inserted hook
  2. Apply that directive to element with v-if and wrapped in <transition>
  3. Toggle visibility of that element

What is expected?

inserted hook to fire (just like bind hook)

What is actually happening?

inserted hook doesn't fire at all


I've spent like couple of hours debugging this on my custom directive VueBar (DominikSerafin/vuebar#5) because I thought this was issue with my code. Unfortunately I think that's issue with Vue itself.

There is a workaround though; just wrap element with directive in another element that will get transitioned (like in 3rd example in the reproduction).

@DominikSerafin DominikSerafin changed the title Directive "inserted" hook doesn't fire when transition is used on binded element Custom directive "inserted" hook doesn't fire when transition is used on binded element Jul 12, 2017
@yyx990803 yyx990803 added the bug label Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants