Custom elements with {shadowRoot: false} not initialised in correct order #11871
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
🐞 bug
Something isn't working
scope: custom elements
Vue version
3.5.3
Link to minimal reproduction
https://play.vuejs.org/#eNqtU01vm0AQ/SubvWBLBmTcXlxiqbGsKpX6obS9IVUIxjbJsoN2F9uVxX/vfmAgjuNccmNm3pt9b3l7pJ+rKtjVQOc0lpkoKrVIeFFWKBQ5khzWBYdlLRWWKwYlcEUashZYEk+TvE8ddollNV1COwtCWwcZmN1nsOgMFg1gCc+Qy3Ydub0kYNQeNSFHuU1z3D8gqjlZp0xCM9Y7+g3RlQ1axasb9I4hXgZuycgr//mZOd2bOIX2uKvQqIVGBhqH3RXrQkFZsVSBrgiJb3yf3P35MidqW0iSI0juKbJH8UR830FOp9uqr6O21p282C3uNflEvYlD02rx4TNCV5p9cThQQydUSX2L62ITPErkOhtHw0iogRcMxI9KFfqWEzondmJmKWO4/2p7StQwOfWzLWRPF/qP8mB6Cf0pQILYQUK7mUrFBpQbr359h4P+7oYl5jXT6CvDB5DIaqPRwe5qnmvZA5xVe29DWfDNb7k6KODyZMoINcjG4hOq02l+4mvWe7mz4IPlJbzRtzhMd//AiARVV8Nnhvwb1lxBfv64XJiRQcBwM/Jcpi3dG5tpRxyNxuR24RRdoJQO5ZkQNpZ5LYqDyEiGioRtXlz/PCrDl/5eJqdvmnzpctq7dCbfz+LfHQiTDW1vFnwMZrT5D2pywKI=
Steps to reproduce
{shadowRoot: false}
and andonMounted
What is expected?
setup script and onMounted callback is called for components in hierarchical order:
my-comp1
my-comp2
<div>I'm not shown</div>
visible in dom.When
shadowRoot
is set totrue
setup and onMounted callback are called in the correct order.What is actually happening?
setup script and onMounted callback is called for components in following order:
my-comp2
my-comp1
<div>I'm not shown</div>
not visible in dom.This deviates from standard lifecycle of vue components.
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: