-
Notifications
You must be signed in to change notification settings - Fork 275
Transition fade out-in doesn't work as expected on first load #6
Comments
Have you already tested this behavior without using http-vue-loader ? |
Yes, sorry I didn't demonstrate this in the GIF. When I include an inline component in the HTML (not loaded by http-vue-loader), that component will transition as expected on the first render. This works as expected side-by-side with components loaded by http-vue-loader.
If it would help, I can mock up a sample project and attach the zip file later tonight. |
The issue is related to the async components loading, I can obtain the same behavior without http-vue-loader (look at this example: https://jsfiddle.net/z11fe07p/1959/). |
Thank you for looking into this! I'm glad to see you're able to reproduce the behavior. I'll follow your post on the Vue forums. Thanks again! |
FYI, vuejs/vue#5760 |
That's great news, thanks for logging the bug! |
fixed in vuejs v2.3.4 |
Thanks again for giving this issue attention. Unfortunately, after pulling the latest version it still appears the bug persists. Please see the GitHub repo below for an example demonstrating the issue. Perhaps the issue lies in my code somewhere, or maybe in the transition css? |
Sorry, the fix is not public yet, wait for v2.3.5 ? |
That might be useful for visibility in case somebody else runs into this issue and needs to know the minimum version that fixed it. |
fixed in vue.js public release v2.4.0 Kill la Kill
|
I agree if you want to close this issue since it is out of your hands at this point, but it does appear the issue still exists in Vue 2.4.2. Just commenting for your awareness in case this appears again. |
fixed (see vuejs/vue#6256) |
HTML Markup
<transition name="fade" mode="out-in"> <component :is="selectedModule"></component> </transition>
Components Load
Vue.component('component-a', httpVueLoader.load('app/components/component-a.vue', 'component-a')); Vue.component('component-b', httpVueLoader.load('app/components/component-b.vue', 'component-b')); Vue.component('component-c', httpVueLoader.load('app/components/component-c.vue', 'component-c'));
It appears the out-in transition behaves the same as the in-out transition (Component B fades in before/during Component A fade out), but only on the first load of the component. If switching between previously loaded (cached?) components, transitions behave as expected. Please see the attached GIF demonstrating the behavior.
I've been digging into the source in hopes to address this myself through a pull request, but unfortunately I'm very new to Vue and some of this is still a mystery to me. If there's anything else I can provide, I'm happy to do so. Thanks!
Demo GIF
The text was updated successfully, but these errors were encountered: