vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
47.67k stars 8.33k forks source link

Transition uses wrong leave-to class when HTML comments exists as template root #5500

Open gmichaeljaison opened 2 years ago

gmichaeljaison commented 2 years ago

Version

3.2.31

Reproduction link

stackblitz.com

Steps to reproduce

Refer the stackblitz link and reproduce the issue by clicking on "Page A" and "Page B" navigations.

What is expected?

Transition should work as expected and noted by the transition-name regardless of existence of comments, i.e. Page A should slide left Page B should slide right

What is actually happening?

Leave transition is not updated for Page component with comments. Page A slides right on leave transition

posva commented 2 years ago

Duplicate of https://github.com/vuejs/core/issues/5266

ygj6 commented 2 years ago

@posva I have tested, PR https://github.com/vuejs/core/pull/5268 can not solve this issue, so it's not a duplicate.

edison1105 commented 3 weeks ago

a workaround: removing the comments