Subscribe on changes!

Conditional rendering causing to trigger CSS transition

avatar
Jan 3rd 2022

Version

3.2.26

Reproduction link

SFC Playground

Steps to reproduce

Change page using pagination button (not prev/next)

What is expected?

Switch should not animate when is mounted

What is actually happening?

For some reason, the switch is animated when is mounted. IDK why because its value is always set to true. This bug is related to the fact that inside the pagination I conditionally render either a button or a span tag. (line 38). If you set ENABLE_SPAN_SWAP to false to disable conditional rendering or use prev/next buttons to change the page then this bug disappears. Also, I couldn't reproduce it in the latest Firefox version, only in the latest Chrome/Chrome Canary.

avatar
Jan 3rd 2022

More info, this is related to the v-model directive. If I replace v-model with :checked attribute in Switch.vue then it's fine

Updated example

avatar
Jan 4th 2022
avatar
Jan 4th 2022

Unfortunately it seems not to be as simple as that ... We will need to look deeper into other remedies

avatar
Jul 21st 2022

@LinusBorg I guess no new news on this issue? Do you have any information regarding the next milestone where this bug could be fixed/reviewed?