Subscribe on changes!

Nested Teleport of disabled teleport stays in DOM when parent is unmounted

avatar
Oct 5th 2021

Version

3.2.19

Reproduction link

codesandbox.io

Steps to reproduce

  1. use a teleport, and set it's disabled prop is true;
  2. put some components inside;
  3. make the teleport unmount (e.g. v-if, switch route, or other...);
  4. these child components will not be unmount.

What is expected?

These child components will be unmount.

What is actually happening?

These child components will not be unmount.

avatar
Nov 24th 2021

I would like to point out that I encountered the exact same problem. In context I used Teleports to simulate the z-index property in a SVG tree, the feature being especially convenient for this. However this issue forced me to change the structure of the app, to avoid using Teleports. So merging the pull request would be very nice :)

avatar
Mar 15th 2023

I have same error,is there any progress?

avatar
Mar 15th 2023

in my case,i use the following methods to solve

render () {
   return disabled ? children : <Teleport>{children}</<Teleport> 
}
avatar
Apr 13th 2023

Same issue here