A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue/issues/6076 below:

Custom directive "inserted" hook doesn't fire when transition is used on binded element · Issue #6076 · vuejs/vue · GitHub

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).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4