Skip to content

fix(runtime-vapor): keep the bound style when hydrating a hidden v-show - #16546

Merged
edison1105 merged 3 commits into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-vshow-style-hydration
Dec 3, 2026
Merged

edison1105 merged 3 commits into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-vshow-style-hydration

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

A hidden dropdown like this one in laradumps (<ul v-show="open" :style> with v-for items) logs a false "Hydration style mismatch" when it hydrates in Vapor. If the bound style sets display: flex, the element comes back as display: block once shown, in prod too (playground, reload once if it first shows a node mismatch; remove vapor to compare with VDOM).

The compiler emits an element's style before its dynamic children but v-show after them, so hydration checks and records the style before v-show owns the element. I now run that check after hydration against the server's style, and v-show takes its display from the bound style instead of the server's display: none.

#16544 fixes a similar restore in runtime-dom.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cab8b893-b899-4d9e-8815-a3e1e8ea726c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@16546
npm i https://pkg.pr.new/@vue/compiler-core@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@16546
npm i https://pkg.pr.new/@vue/compiler-dom@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@16546
npm i https://pkg.pr.new/@vue/compiler-sfc@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@16546
npm i https://pkg.pr.new/@vue/compiler-ssr@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@16546
npm i https://pkg.pr.new/@vue/compiler-vapor@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@16546
npm i https://pkg.pr.new/@vue/reactivity@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@16546
npm i https://pkg.pr.new/@vue/runtime-core@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@16546
npm i https://pkg.pr.new/@vue/runtime-dom@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@16546
npm i https://pkg.pr.new/@vue/runtime-vapor@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@16546
npm i https://pkg.pr.new/@vue/server-renderer@16546
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@16546
npm i https://pkg.pr.new/@vue/shared@16546
yarn add https://pkg.pr.new/@vue/[email protected]

vue

pnpm add https://pkg.pr.new/vue@16546
npm i https://pkg.pr.new/vue@16546
yarn add https://pkg.pr.new/[email protected]

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@16546
npm i https://pkg.pr.new/@vue/compat@16546
yarn add https://pkg.pr.new/@vue/[email protected]

commit: 570f049

@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.5 kB 30.7 kB 27 kB
runtime-dom.global.prod.js 127 kB 47.4 kB 42.4 kB
vue.global.prod.js 187 kB 67.7 kB 60.2 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 55.9 kB 21.7 kB 19.8 kB
createApp 65.5 kB 25.2 kB 22.9 kB
createApp + vaporInteropPlugin 127 kB 46.6 kB 41.8 kB
createVaporApp 37.2 kB 14.2 kB 13.1 kB
createSSRApp 70.4 kB 27.2 kB 24.7 kB
createVaporSSRApp 46 kB (+34 B) 17.5 kB (+14 B) 16.1 kB (+58 B)
defineCustomElement 72.1 kB 27.2 kB 24.7 kB
defineVaporCustomElement 52.3 kB 19.1 kB 17.5 kB
overall 82.7 kB 31.3 kB 28.3 kB

Apps

Name Size Gzip Brotli
counter app (CAPI only) 57.5 kB 22.3 kB 20.4 kB
counter vapor app (CAPI only) 47.5 kB 17.7 kB 16.2 kB
todo app (CAPI only) 73.9 kB 28.4 kB 25.8 kB
todo vapor app (CAPI only) 80.9 kB (-6 B) 29.9 kB (+1 B) 27.1 kB (-48 B)

@edison1105 edison1105 added the scope: vapor related to vapor mode label Dec 3, 2026
@edison1105
edison1105 merged commit 8e2a6df into vuejs:minor Dec 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants