Version
2.3.4
Reproduction link
https://jsfiddle.net/aL1dgdc8/11/
Steps to reproduce
- Create custom directive that uses
inserted hook
- Apply that directive to element with
v-if and wrapped in <transition>
- 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).