Subscribe on changes!

Transition class is sometimes not being removed correctly when using v-show

avatar
Mar 28th 2022

Version

3.2.31

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Open the SFC Playground link and click on the "Activate" button.

What is expected?

Both the v-ifand the v-show div containers should be displayed after clicking the "Activate" button.

What is actually happening?

Sometimes the second div container which uses v-show is not displayed correctly - it uses the same reactive variable as the other container which uses v-if but its Vue.js transition class (fade-leave-to) is not being removed correctly, so it stays in the leave-to state.


The myArray array which length is used to compute the visibility state of both containers is being changed rapidly multiple times in the activate() function. This could be other things like a WebSocket message which mutates the array in real world scenarios.

avatar
Mar 28th 2022

This could be a duplicate of #4462