Subscribe on changes!

DOM node of a mounted component is not a child of Document if the component is wrapped with both Transition and Suspense.

avatar
Aug 3rd 2022

Vue version

3.2.37

Link to minimal reproduction

Steps to reproduce

<Transition name="page" mode="out-in">
      <Suspense>
          <my-component-one v-if="flag"></my-component-one>
          <my-component-two v-else></my-component-two>
      </Suspense>
</Transition>
  1. Update the flag from true to false that will change <my-component-one> to <my-component-two >.
  2. The $el of <my-component-two > is not a child of Document in the lifecycle mounted.

What is expected?

The $el of a component should have been inserted into Document in the lifecycle mounted.

What is actually happening?

Refer to Steps to reproduce

System Info

No response

Any additional comments?

No response

avatar
Aug 31st 2022

Duplicate of #5844