Subscribe on changes!

Components don't render when the Transition mode is "out-in"

avatar
Sep 13th 2022

Vue version

3.2.33

Link to minimal reproduction

https://sfc.vuejs.org/#eNqdU81y4yAMfhUtlzYztZm4p/W6nez0DXrm4ti4obGBAZEcMnn3CmOncf8OneEifT9CEpzYf2vzQ5CsZJVvnLIIXmKwj0KrwRqHcAK/q/veHJ9lB2fonBnghhQ3F8aTGex6AnI+RtFySSgWhGIiCN0Y7RFqa+HhqtDt6l8Eu6AbVEaD0U+9ava3anUSGsAfFTa7OQJoai9hXaYAolt+qPsgyXO8DpklZOtkvZ+iUVR8Kyq+FLWyq0OPF9U7dhaaTsXTFGl+FKAcbF+jpAig2gZE6mXTxFYeBJubWq8Ee2ziPSueOD/zi5lfLPnoau3VOK/BtDIqAmZKEztdt4oio6VGKJUnnHomsOKXfDLi706UoHBug92xtNJsqG3+6o2mdzPuQEyAF6yEaSuC0ZJjLNgO0fqS86Dt/iWncnxDGHdBoxpk1pphc58X+f1f3iqP1/lc+iHbOnP00lFFwe6uzDklD9JlTupWOul+LPaBuyj4AftUdF4wDeDyvuOXWS74T5aB0p2BLIv7x6pVh2n0uFMe6IzqNOQEXk1X4GQ//o5f2xff25/fACWETzI=

Steps to reproduce

Open the SFC link I submitted and click the button to switch components

What is expected?

Render the component and perform the animation according to the mode, or prompt: it is not allowed to use comments on the first line of the template of the component

What is actually happening?

Components do not render

System Info

no

Any additional comments?

No response

avatar
Sep 13th 2022

Looks good when remove this comment in component

 <!-- info -->

I guess the reason is that the Transition can only have one node playground

avatar
Sep 13th 2022

Looks good when remove this comment in component

 <!-- info -->

I guess the reason is that the Transition can only have one node playground

You're right, but i don't think comment is node in Transition unless Vue warns: Component inside renders non-element root node that cannot be animated.

avatar
Sep 13th 2022

The comment will be rendered into a COMMENT NODE,effect the transition of course image

avatar
Sep 13th 2022

Flat when the node does not filter out the comment node

image

avatar
Sep 13th 2022

Root level comments is working when Transition's mode with "default" or "in-out", why not when the mode with "out-in"? image