Skip to content

fix(runtime-core): use correct container for patch Teleport inside …#1703

Merged
yyx990803 merged 5 commits intovuejs:masterfrom
underfin:teleport
Jul 28, 2020
Merged

fix(runtime-core): use correct container for patch Teleport inside …#1703
yyx990803 merged 5 commits intovuejs:masterfrom
underfin:teleport

Conversation

@underfin
Copy link
Copy Markdown
Member

…block tree

fix #1690

disabled.value = true
await nextTick()
expect(serializeInner(root)).toMatchInlineSnapshot(
`"<!--teleport start--><div>teleported</div><!--teleport end--><div>root</div>"`
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fail in test, but I don‘t know why.The 250 line invoked, but the dom tree not update and not invoke the 260 code(and not throw errors in debug).
https://github.com/vuejs/vue-next/blob/6efb2fe3ea2586c2dae065c09de7039c2d46c509/packages/runtime-core/src/components/Teleport.ts#L248-L262

@yyx990803
Copy link
Copy Markdown
Member

This failing test actually exposed some issues regarding the handling of Teleport children in block tree mode. The main reason is that its direct children needs to always inherit vnode.el from previous children so that they can be moved later, but it is sometimes skipped in block tree mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

binding disabled of <teleport>

2 participants