Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
…lds them vdom removes a Fragment (a slot outlet, a v-for list, several roots, a TransitionGroup without a tag) as the DOM range between its anchors. An element that still leaves in a Transition or a TransitionGroup in that range goes with it. Vapor removes blocks, so the element stayed until its leave ended. A Vapor app then kept a leaving element after `app.unmount()` where a vdom app removed it. Removal of a slot outlet, a v-for list or several blocks now marks a range. A Transition removed in a range removes its leaving elements from the same parent. A TransitionGroup without a tag does so on each removal. The leave runs to its end, as in vdom. A Teleport's children are not a range, as in vdom.
jrandolf
force-pushed
the
fix/vapor-transition-unmount-leave
branch
from
November 23, 2026 03:23
165062d to
e59d83f
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #15923.
vdom removes a Fragment as the DOM range between its anchors (
removeFragmentinrenderer.ts). A slot outlet, av-forlist, several roots and a<TransitionGroup>without a tag are such Fragments. An element that still leaves in a<Transition>or a<TransitionGroup>in the range goes with it. Vapor removes a fragment by its blocks, so the element stays until its leave ends. In 3.6.0-rc.16, a Vapor app keeps the leaving element afterapp.unmount()or after av-ifremoves the range. A vdom app removes it at once.Set
showtofalse, then callapp.unmount()while the<div>leaves. A vdom app removes the<div>from<body>. A Vapor app keeps it until its leave ends. PlaygroundWith no Fragment around the Transition (a Transition root, a Transition in a Teleport), vdom also keeps the element until its leave ends, as #15923 tests. Vapor does the same there, and this change keeps it.
Fix.
remove()marks a range while it removes a slot outlet, av-forlist or more than one block. A Transition that this removal reaches removes its leaving elements from the same parent. A<TransitionGroup>without a tag does so on each removal, because it is a Fragment itself. The leaves run to their end, soonAfterLeavecomes at the end of the leave, as in vdom. A Teleport removes its children one by one and not as a range, as vdom'sTeleportImpl.removedoes. A range around a Teleport does not reach its target. A vdom Transition in a vdom component in a Vapor range still keeps its element, because runtime-core gives no access to its leaving elements.Test. Vdom and Vapor give the same log when a
v-iforapp.unmount()removes the range while the child leaves, in each Transition mode: a Transition in a slot outlet, in a slot outlet in a Teleport, in av-forlist and beside another root; a<TransitionGroup>without a tag, alone and in a slot outlet. Two controls keep the element in both: a Teleport with several children, and a Teleport in a slot outlet.