frontend #vue #ssr #teleport #transition #patch-management #laravel #inertia #testing

Vue's Latest Patch Touches Teleport, Transition and SSR CSS Variables: Where to Re-test Before You Bump

Vue's Nov 20 patch fixes SSR CSS variables on Teleport roots, Transition classes that never leave, and Teleport hydration. A repo scanner, a real before/after test, and what to re-run before you bump.

Every Vue app has a pop-up somewhere. A modal, a tooltip, a dropdown that has to sit on top of everything else, so someone wrapped it in <Teleport to="body">. It looks right in the browser. Then a teammate turns on server rendering, and the first paint of that pop-up is missing a style.

On Nov 20, 2026, Vue shipped a patch release that fixes that exact shape of bug, plus a few neighbours: a CSS class that stays on an element after the animation was cancelled, and a hydration mix-up when one teleport sits inside another. The changelog marks none of it as a security fix. None of it needs a weekend. But all of it lives in the parts of a Vue app that nobody tests on purpose.

So the useful question is not “should we upgrade?” It is “which of our own pages touch these features, and how would we see it break?”

The question is not whether the patch notes sound relevant. It is whether you can name the files in your own repo that use the feature, and show the difference on one of them.

What the patch lists, in plain words

I read the Vue CHANGELOG.md on main on Nov 22, about 08:00 Jakarta time. The entry for 3.5.46 is dated 2026-11-20. The GitHub release for the same tag was published on 2026-11-20 at 08:18 UTC, and its body only points to the changelog. The previous patch, 3.5.45, is dated 2026-11-05. On the npm registry the latest tag is 3.5.46 and the rc tag is 3.6.0-rc.16, so Vue 3.6 is still a release candidate.

The changelog has sixteen lines under “Bug Fixes”. Here are the ones that matter for an everyday app, grouped by what they touch. The wording in the middle and right columns is mine; the issue and pull request pages say more.

Fix areaWhat in your app touches itHow you would see it break
CSS variables in server rendering: compiler-ssr “inject css vars into the content of keep-alive and teleport”; “inject css vars through root loops and fragments”A component with v-bind() inside <style> whose root is a <Teleport>, a <KeepAlive>, or a v-forThe server HTML has no --hash-name: style on that element. It looks unstyled until JavaScript takes over
CSS variables after a root change: runtime-dom “apply css vars to teleported content replaced without patching the teleport”A component inside a Teleport that swaps its own root elementThe new element misses the variable, so a width or colour from v-bind() is ignored
Teleport hydration: hydration “claim disabled teleport target anchors before nested teleports”A <Teleport :disabled="..."> that contains another Teleport to the same target, on a server-rendered pageLater teleports to that target are matched against the wrong server HTML. The pull request calls the comment-node case “silent misbinding in production”
Transition: “ignore stale enter callbacks on a reused element”, “ignore stale leave callbacks on a reused element”, “only skip enter for the element that is leaving”<Transition> with v-show, such as hover tooltips and menus that open and close fastA class like *-enter-to stays on the element, or the next show does not animate
shared: “handle objects without a prototype in looseEqual”v-model on radios and checkboxes where the value is an object with no prototype, such as Object.create(null)An error instead of a comparison

Find the places in your own repo first

Before you test anything, you need a list. The patch only matters where you use these features, and most teams cannot say from memory which components use <Teleport>.

This script reads .vue files and prints each place where a Teleport, KeepAlive or Transition tag appears, and each v-bind() inside a <style> block. It also flags Teleports that target body or can be disabled, and prints one extra line for any file that has both a v-bind() and a Teleport or KeepAlive, because that pairing is what the CSS-variable fix is about. It reads files and nothing else.

 1#!/usr/bin/env python3
 2"""List the places in a Vue repo that the Vue 3.5.46 fix list touches.
 3
 4Usage: vue_retest_scan.py [REPO_DIR]
 5Exit 0 = nothing found. Exit 1 = places to re-test. Exit 3 = bad path.
 6"""
 7import re
 8import sys
 9from pathlib import Path
10
11SKIP = {"node_modules", ".git", "vendor", "dist", "build", "public", ".nuxt", ".output", "storage"}
12TAGS = {
13    "teleport": re.compile(r"<teleport\b", re.I),
14    "keepalive": re.compile(r"<(keepalive|keep-alive)\b", re.I),
15    "transition": re.compile(r"<(transition|transitiongroup|transition-group)\b", re.I),
16}
17STYLE_BLOCK = re.compile(r"<style\b[^>]*>(.*?)</style>", re.S | re.I)
18TO_BODY = re.compile(r"""\bto\s*=\s*["']body["']""")
19DISABLED = re.compile(r"(:disabled|\bdisabled\b)")
20
21
22def scan_file(path):
23    text = path.read_text(encoding="utf-8", errors="replace")
24    hits = []
25    for number, line in enumerate(text.splitlines(), 1):
26        for area, rx in TAGS.items():
27            if rx.search(line):
28                note = ""
29                if area == "teleport":
30                    if TO_BODY.search(line):
31                        note += " [to=body]"
32                    if DISABLED.search(line):
33                        note += " [disabled]"
34                hits.append((area, number, line.strip()[:90] + note))
35    for block in STYLE_BLOCK.finditer(text):
36        start_line = text.count("\n", 0, block.start(1)) + 1
37        for offset, line in enumerate(block.group(1).splitlines()):
38            if "v-bind(" in line:
39                hits.append(("cssvars", start_line + offset, line.strip()[:90]))
40    return hits
41
42
43def main(argv):
44    root = Path(argv[0] if argv else ".")
45    if not root.is_dir():
46        print(f"not a folder: {root}")
47        return 3
48    totals = {"teleport": 0, "keepalive": 0, "transition": 0, "cssvars": 0}
49    files_with = {}
50    for path in sorted(root.rglob("*.vue")):
51        if SKIP & set(path.relative_to(root).parts):
52            continue
53        hits = scan_file(path)
54        if not hits:
55            continue
56        rel = path.relative_to(root)
57        files_with[str(rel)] = {a for a, _, _ in hits}
58        for area, number, text in hits:
59            totals[area] += 1
60            print(f"{area:10} {rel}:{number}  {text}")
61    pairs = sorted(f for f, a in files_with.items() if "cssvars" in a and ({"teleport", "keepalive"} & a))
62    for f in pairs:
63        print(f"pair       {f}  v-bind() in a file with Teleport or KeepAlive")
64    if not files_with:
65        print("nothing found")
66        return 0
67    print("files: %d | teleport %d | keepalive %d | transition %d | cssvars %d | pairs %d" % (
68        len(files_with), totals["teleport"], totals["keepalive"], totals["transition"], totals["cssvars"], len(pairs)))
69    return 1
70
71
72if __name__ == "__main__":
73    sys.exit(main(sys.argv[1:]))

I ran it on a small fixture I made: a modal with <Teleport to="body"> and a v-bind() style, a tooltip with <Transition> and v-show, and a page with <KeepAlive> and a disabled teleport. I also put a .vue file inside node_modules to check that it is skipped.

 1$ python3 vue_retest_scan.py fixture
 2teleport   resources/js/Components/Modal.vue:5  <Teleport to="body"> [to=body]
 3cssvars    resources/js/Components/Modal.vue:10  .modal { color: v-bind(color); }
 4transition resources/js/Components/Tooltip.vue:2  <Transition name="fade">
 5keepalive  resources/js/Pages/Tabs.vue:2  <KeepAlive><component :is="tab" /></KeepAlive>
 6teleport   resources/js/Pages/Tabs.vue:3  <teleport to="#portal" :disabled="isMobile"><p>x</p></teleport> [disabled]
 7pair       resources/js/Components/Modal.vue  v-bind() in a file with Teleport or KeepAlive
 8files: 3 | teleport 2 | keepalive 1 | transition 1 | cssvars 1 | pairs 1
 9$ echo $?
101

An empty folder printed nothing found and exited 0. A missing path printed not a folder and exited 3. On this site’s repository, a Hugo site with no .vue files, it found nothing, which says the scanner works, not that any Vue app is clean.

It has one blind spot. It pairs v-bind() and <Teleport> only inside one file. If the Teleport sits in a child component and the v-bind() is in the parent, the file is not paired. Treat the pair line as the first place to look, not the only one.

Test 1: the CSS variable that went missing on the server

The Vue docs describe the v-bind() feature in <style> like this: the value is “compiled into a hashed CSS custom property, so the CSS is still static”, and the property is “applied to the component’s root element via inline styles”. In plain words: your style says color: v-bind(color), Vue turns that into color: var(--hash-color) and puts --hash-color: red on the component’s root element.

Now ask what the root element is when the root is a <Teleport>. A Teleport does not render an element of its own. The pull request for this fix says that KeepAlive and Teleport “render their children without an element of their own in SSR, so the props bound to them never reach the output”.

To check it, I made two throwaway projects. One has [email protected] and one has [email protected], each installed with exact versions, together with the matching @vue/compiler-sfc and @vue/server-renderer. The same script compiles three tiny components for server rendering and prints the HTML. Here are the three components, shortened to the part that matters:

1<!-- teleportRoot.vue -->
2<script setup>const color = 'red'</script>
3<template><Teleport to="body"><div class="modal">hi</div></Teleport></template>
4<style scoped>.modal { color: v-bind(color) }</style>
5
6<!-- keepAliveRoot.vue: same style, root is <KeepAlive><div class="tab">tab</div></KeepAlive> -->
7<!-- vForRoot.vue:      same style, root is <div v-for="item in items" :key="item" class="item"> -->

The harness uses only public pieces: parse, compileScript and compileTemplate from @vue/compiler-sfc (with ssr: true and ssrCssVars), then renderToString from @vue/server-renderer. Teleport content is not part of the returned string, so the harness also prints ctx.teleports, which is where Vue puts it.

 1const { descriptor } = parse(src, { filename })
 2const script = compileScript(descriptor, { id })
 3const tpl = compileTemplate({
 4  source: descriptor.template.content, filename, id,
 5  scoped: descriptor.styles.some((s) => s.scoped),
 6  ssr: true,
 7  ssrCssVars: descriptor.cssVars,
 8  compilerOptions: { bindingMetadata: script.bindings },
 9})
10// stitch script + template into one ES module, import it, then:
11const ctx = {}
12const html = await renderToString(createSSRApp(mod.default), ctx)
13console.log(html, ctx.teleports)

Here is what came out. The CSS variable is the --abc12345-color:red; part; I gave every component the id abc12345 so the output is easy to compare.

1=== vue 3.5.45
2teleportRoot   teleports={"body":"<!--teleport start anchor--><div class=\"modal\" data-v-abc12345>hi</div><!--teleport anchor-->"}
3keepAliveRoot  html=<div class="tab" data-v-abc12345>tab</div>
4vForRoot       html=<!--[--><div class="item" data-v-abc12345>a</div><div class="item" data-v-abc12345>b</div><!--]-->
5
6=== vue 3.5.46
7teleportRoot   teleports={"body":"<!--teleport start anchor--><div class=\"modal\" style=\"--abc12345-color:red;\" data-v-abc12345>hi</div><!--teleport anchor-->"}
8keepAliveRoot  html=<div class="tab" style="--abc12345-color:red;" data-v-abc12345>tab</div>
9vForRoot       html=<!--[--><div class="item" style="--abc12345-color:red;" data-v-abc12345>a</div><div class="item" style="--abc12345-color:red;" data-v-abc12345>b</div><!--]-->

All three differ in the way the changelog says. In 3.5.45 the server HTML has no style="--abc12345-color:red;", so color: var(--abc12345-color) resolves to nothing until the browser version of the component runs and sets it. In 3.5.46 the variable is in the server HTML on the modal, on the keep-alive child, and on each v-for item.

What this means for a real page: before hydration, that modal, tab or list row can render with the browser’s default colour, width or spacing, then jump when JavaScript starts. It is a short flash that is easy to dismiss as “slow JavaScript”. If the v-bind() value controls a panel width, the jump is visible.

The comparison above is the whole claim. I rendered the HTML string. I did not open it in a browser, and I did not check any real app.

One tip from the Vue server-rendering guide is easy to miss: avoid targeting body with Teleports when you also use SSR, because body usually holds other server-rendered content, which “makes it impossible for Teleports to determine the correct starting location for hydration”. It recommends a dedicated container such as <div id="teleported"></div>. The scanner prints [to=body] for that reason. A hydration fix does not turn to="body" into a good idea.

Server HTML for three components, Vue 3.5.45 versus 3.5.46: the CSS variable is missing on the Teleport, KeepAlive and v-for roots in 3.5.45 and present in 3.5.46.

Test 2: the class that never left

The Transition fixes are easier to read from the pull requests than from the changelog. The first describes a hover tooltip, where the mouse just passes over the trigger. The element is shown with v-show and hidden again before the first animation frame of its enter. The pull request says *-enter-to then stays on the element, and if your CSS styles that class, the next show does not animate. The second pull request covers the leave side: a cancelled leave whose timer fires later and removes a class the next enter also needed, which is normal when utility CSS uses one class string for both.

I tried the first one in jsdom, a simulated browser for Node, with pretendToBeVisual so animation frames run. The component is a <Transition> with a v-show element and duration: 300. The script shows it, hides it again right away, waits 120 ms, then reads the element’s classes.

 1const visible = ref(false)
 2const App = {
 3  setup() {
 4    return () =>
 5      h(Transition, { name: 'v', duration: 300 }, {
 6        default: () => withDirectives(h('div', { id: 't' }, 'tip'), [[vShow, visible.value]]),
 7      })
 8  },
 9}
10createApp(App).mount('#app')
11await nextTick()
12const el = document.getElementById('t')
13
14visible.value = true;  await nextTick()
15visible.value = false; await nextTick()   // hidden before the enter's first frame
16await sleep(120)
17console.log('classes after 120 ms:', JSON.stringify(el.className))
18await sleep(500)
19console.log('classes after 620 ms:', JSON.stringify(el.className))
1=== vue 3.5.45
2A) classes after 120 ms: "v-leave-active v-enter-to v-leave-to"
3A) classes after 620 ms: "v-enter-to"
4
5=== vue 3.5.46
6A) classes after 120 ms: "v-leave-active v-leave-to"
7A) classes after 620 ms: ""

In 3.5.45 the element still carries v-enter-to more than half a second after it was hidden, long after both transitions should be over. In 3.5.46 the class is gone, and the element ends with no transition classes. That is the symptom the pull request describes. If your CSS puts an opacity or transform on .v-enter-to, a stuck class is a stuck style.

Classes left on a tooltip element after show-then-hide: Vue 3.5.45 keeps v-enter-to after 620 ms, Vue 3.5.46 leaves none.

I also wrote a second case for the leave side: hide, show again before the leave timer fires, then watch the classes. Both versions gave the same classes at every step I looked at, so I did not reproduce the leave bug. That does not make the leave fix empty; my timings and CSS-free setup can simply miss the path the pull request describes. jsdom has no layout and no real transitions, which is why I set an explicit duration.

One small one: looseEqual on a prototype-less object

The shared fix is one function, so it is easy to check. Vue uses looseEqual to compare values for radio and checkbox v-model.

1const { looseEqual } = require('@vue/shared')
2looseEqual(Object.create(null), Object.create(null))
1vue 3.5.45  looseEqual(null-proto, null-proto) THROWS: Cannot convert object to primitive value
2vue 3.5.46  looseEqual(null-proto, null-proto) = true

Objects with no prototype are rare in app code. If you do not use them as v-model values, this line is not for you.

What I could not reproduce here

Three things in the list need a real browser or a real app. I did not run them:

  • Teleport hydration anchors. The pull request explains the failure well. In its words, server rendering writes the outer teleport’s empty anchors into the target before the nested block, while hydration “hydrated its children first and only then” claimed the anchors, so the nested teleport took the outer one’s. It also says that when the nested content is a v-if comment, this is “silent misbinding in production”. To see it you need server HTML, a browser and a page with the nesting. I did not build that.
  • Suspense with an out-in transition. The changelog says mounted hooks now run once. I did not test it.
  • The SFC compiler lines (tsconfig matching, generic types, onWarn). Your type-check run is the test.

Also, the server-render alias fix. I compiled <label className="field" htmlFor="email"> with both versions and both printed class="field" and for="email". My sample did not show the difference the pull request describes, so I have no before-and-after for that line.

How to bump without guessing

  1. Bump in a branch. Pin the exact version, not a range. A framework patch is the kind of change that should not slide in with an unrelated npm update.
  2. Rebuild the server bundle. The CSS-variable fix is in the template compiler. If you run a separate SSR build, such as Inertia SSR or a Nuxt build, it has to be rebuilt to pick the fix up. A running server process does not change by itself.
  3. Open the pages the scanner listed with the browser console open. Vue prints a warning in development when the server markup does not match what the client builds. Any warning on a Teleport page is the thing to read first.
  4. Reload each modal with throttled CPU. The flash is short on a fast laptop. In the browser’s performance panel, 4x or 6x CPU slowdown makes a missing variable easy to see.
  5. Open and close each tooltip fast. Hover on and off the trigger a few times, then inspect the element. After the transition ends it should carry no *-enter-to or *-leave-to class.
  6. Look at the diff of your lockfile. vue, @vue/compiler-sfc, @vue/server-renderer and the other @vue/* packages should all move to the same version. A mix is a finding.
  7. Write the result next to the bump. One line: which pages you opened and what you saw.

Five checks in order: list the pages, bump in a branch, rebuild the server bundle, open with the console, hover tooltips fast.

What this does not say

  • It does not say every Vue app is affected. Each fix needs a feature you use.
  • It does not say 3.5.45 is broken in general. It says the specific cases shown above behave differently.
  • It does not say Vue 3.6 is stable. The npm rc tag is 3.6.0-rc.16.
  • It does not say any app of mine hit these bugs. I checked a harness, not a production page.

What I did and did not verify

On Nov 22 at about 08:00 Jakarta time I read the Vue CHANGELOG.md from main, the GitHub release objects for v3.5.46 and v3.5.45, and the npm dist-tags for vue. I read the issue and pull request text, through the GitHub API, for the fixes in the table, and the relevant parts of four Vue docs pages: Teleport, SFC CSS features, Server-Side Rendering and Transition.

I ran everything shown above on Node 26.12.1 with vue, @vue/compiler-sfc and @vue/server-renderer pinned at 3.5.45 in one folder and 3.5.46 in another, plus jsdom 31.0.1 for the Transition case. The scanner ran on a fixture, an empty folder, a missing path and this site’s repository. I did not run any real application, any browser, the Teleport hydration case, the Suspense case or the SFC compiler cases.

What you should do Monday morning

  1. Run the scanner on every repo with a .vue file. Save the output. It is your list of pages to open.
  2. Read the pair lines first. A v-bind() in a file with a Teleport or KeepAlive is the case the compiler fix is about.
  3. Read the [to=body] lines next. Move them to a dedicated container if you server-render, as the Vue docs recommend.
  4. Bump vue in a branch, pin it exactly, and rebuild the server bundle.
  5. Open each listed page with the console open, once with the CPU throttled, and hover every tooltip.
  6. Check that all @vue/* packages in the lockfile moved together.
  7. Write down the result, one line per page, in the pull request.

What this connects to

It is the same habit as A UI kit lockfile bump is change control, not cosmetics: a bump is a decision that needs a list of places and an owner. Vite Fixed a Critical Dev Server Bug used a scanner and a version check the same way. If you are watching Vue 3.6, Vue 3.6 Vapor Mode: Build a Pilot Harness Before You Change a Rendering Path covers the pilot side.

More on Laravel and Vue projects is in the Laravel and Vue SaaS hub and the developer tools hub.

Further reading