Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime-core): fix missed updates when passing text vnode to <component :is> #8304

Conversation

auvred
Copy link
Contributor

@auvred auvred commented May 13, 2023

fix #8298

The issue occurs when cloned initially had patchFlag === PatchFlags.TEXT, so

1 << 1 | -2 = -2
1 << 2 | -2 = -2
1 << 3 | -2 = -2
etc...

But with PatchFlags.TEXT = 1

1 | -2 = -1

And patchFlag becomes -1 and then patchFlag is basically PatchFlags.HOISTED, so it loses render patches

* Special flags are negative integers. They are never matched against using
* bitwise operators (bitwise matching should only happen in branches where
* patchFlag > 0), and are mutually exclusive. When checking for a special
* flag, simply check patchFlag === FLAG.

@auvred auvred changed the title fix(runtime-core): fix missed updates when passing text node to <components :is> fix(runtime-core): fix missed updates when passing text vnode to <component :is> May 13, 2023
@skirtles-code
Copy link
Contributor

Would it be possible to add a test?

@pikax
Copy link
Member

pikax commented Oct 20, 2023

@auvred is it possible to add a test please?

@auvred
Copy link
Contributor Author

auvred commented Oct 20, 2023

Sorry for delay, I added test

@netlify
Copy link

netlify bot commented Oct 20, 2023

Deploy Preview for vue-next-template-explorer failed.

Name Link
🔨 Latest commit 2cf0678
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/65325f33b676be0008f630a7

@netlify
Copy link

netlify bot commented Oct 20, 2023

Deploy Preview for vue-sfc-playground failed.

Name Link
🔨 Latest commit 2cf0678
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/65325f33b0f4ef00092075a7

Copy link

github-actions bot commented Dec 1, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 90.2 kB (-1 B) 34.4 kB (-3 B) 30.9 kB (-7 B)
vue.global.prod.js 147 kB (-1 B) 53.6 kB (-3 B) 47.8 kB (-26 B)

Usages

Name Size Gzip Brotli
createApp 50.3 kB (-1 B) 19.7 kB (-1 B) 18 kB
createSSRApp 53.6 kB (-1 B) 21 kB (-1 B) 19.1 kB (-1 B)
defineCustomElement 52.6 kB (-1 B) 20.4 kB (-1 B) 18.6 kB (+14 B)
overall 64 kB (-1 B) 24.8 kB (-2 B) 22.5 kB (+1 B)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working ready to merge The PR is ready to be merged.
Projects
Development

Successfully merging this pull request may close these issues.

[bug] Template is not updating when passing vnode to Dynamic Component.
5 participants