Nested Teleport of disabled teleport stays in DOM when parent is unmounted
Version
3.2.19
Reproduction link
Steps to reproduce
- use a teleport, and set it's disabled prop is
true
; - put some components inside;
- make the teleport unmount (e.g. v-if, switch route, or other...);
- 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.
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 :)
in my case,i use the following methods to solve
render () {
return disabled ? children : <Teleport>{children}</<Teleport>
}