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): handle disabled teleport with updateCssVars #12113

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

linzhe141
Copy link
Contributor

close #12112

@linzhe141 linzhe141 marked this pull request as draft October 5, 2024 01:51
Copy link

github-actions bot commented Oct 5, 2024

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB (+47 B) 38.1 kB (+23 B) 34.2 kB (+36 B)
vue.global.prod.js 160 kB (+47 B) 58 kB (+27 B) 51.5 kB (-38 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 49.1 kB 18.9 kB 17.3 kB
createApp 55.7 kB 21.4 kB 19.6 kB
createSSRApp 59.7 kB 23.1 kB 21 kB
defineCustomElement 60.4 kB 23 kB 20.9 kB
overall 69.4 kB 26.5 kB 24.1 kB

Copy link

pkg-pr-new bot commented Oct 5, 2024

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@12113

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@12113

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@12113

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@12113

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@12113

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@12113

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@12113

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@12113

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@12113

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@12113

vue

pnpm add https://pkg.pr.new/vue@12113

commit: 719b0f0

@linzhe141 linzhe141 marked this pull request as ready for review October 5, 2024 02:08
@@ -467,7 +467,7 @@ function updateCssVars(vnode: VNode) {
// code path here can assume browser environment.
const ctx = vnode.ctx
if (ctx && ctx.ut) {
let node = vnode.targetStart
let node = vnode.targetStart || (vnode.children as VNode[])[0].el!
Copy link
Member

Choose a reason for hiding this comment

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

this is not the proper fix. For disabled teleport the begining node should be vnode.el and the end node should be vnode.anchor.
So the proper fix might be

let node,anchor
if(isDisabled){
  node=vnode.el
  anchor=vnode.anchor
}else{
  node=vnode.targetStart
  anchor=vnode.targetAnchor
}
while (node && node !== anchor) {
 //...
}

@edison1105 edison1105 added ready to merge The PR is ready to be merged. scope: teleport labels Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR is ready to be merged. scope: teleport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v-bind of CSS values not working when Teleport is disabled
2 participants