We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7b4a37 commit bebd44fCopy full SHA for bebd44f
packages/runtime-core/src/renderer.ts
@@ -1157,7 +1157,12 @@ function baseCreateRenderer(
1157
)
1158
// #2080 if the stable fragment has a key, it's a <template v-for> that may
1159
// get moved around. Make sure all root level vnodes inherit el.
1160
- if (n2.key != null) {
+ // #2134 or if it's a component root, it may also get moved around
1161
+ // as the component is being moved.
1162
+ if (
1163
+ n2.key != null ||
1164
+ (parentComponent && n2 === parentComponent.subTree)
1165
+ ) {
1166
traverseStaticChildren(n1, n2, true /* shallow */)
1167
}
1168
} else {
0 commit comments