You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to that codepen and click both links for "show" and "if" to "yes". Toggle just "show" off, note the transition occurs. Toggle "show" back on and then toggle "if" off, note that there is no transition out.
What is Expected?
I expected to still see the box transition out. Or, in other words, anenter transition should trigger only if both v-show and v-if == true. And a leave transition should trigger only if either v-show or v-if != true.
What is actually happening?
If v-if == true and v-show changes from true to false, the leave transition occurs as expected. If v-show== true and v-if changes from true to false, the element is immediately removed, no transition occurs.
My use case for this is using both v-if and v-show around media (img, video). The v-if triggers a load to start and then, once they are loaded, the v-show triggers the element to be revealed.