Skip to content

fix(v-model): preserve text input before hydration - #14411

Merged
edison1105 merged 5 commits into
mainfrom
edison/fix/14403
Aug 4, 2026
Merged

edison1105 merged 5 commits into
mainfrom
edison/fix/14403

Conversation

@edison1105

@edison1105 edison1105 commented Feb 4, 2026 •

Copy link
Copy Markdown
Member

close #14403

Summary by CodeRabbit

  • Bug Fixes
    • Preserved text entered into v-model inputs before server-rendered content finishes hydrating.
    • Synchronized pre-hydration input changes back to the reactive application state.
    • Prevented hydration from unnecessarily overwriting user-entered values while still applying the bound value when no edits were made.

@coderabbitai

coderabbitai Bot commented Feb 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

Text v-model hydration now records the initial input value, preserves edits made before hydration, and synchronizes those edits with the reactive model. Hydration tests verify the behavior.

Changes

Text v-model hydration preservation

Layer / File(s) Summary
Hydrated text input reconciliation
packages/runtime-dom/src/directives/vModel.ts
Text inputs record a normalized initial value during creation. Mounting compares it with the current value, updates the model for user edits, and otherwise applies the bound value.
Hydration behavior validation
packages/runtime-core/__tests__/hydration.spec.ts
Hydration coverage verifies that pre-hydration text input is preserved and synchronized with reactive state.

Estimated code review effort: 3 (Moderate) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Hydration
  participant vModelText
  participant HTMLInputElement
  participant ReactiveModel
  Hydration->>vModelText: mount hydrated text input
  vModelText->>HTMLInputElement: read initial and current values
  vModelText->>ReactiveModel: assign user-edited value
  ReactiveModel->>HTMLInputElement: apply bound value when unchanged
Loading

Suggested labels: :lady_beetle: bug

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes preserve user-entered text input values during hydration and synchronize them to v-model state, addressing issue #14403.
Out of Scope Changes check ✅ Passed The changes are limited to text v-model hydration handling and its corresponding hydration test.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: preserving text input entered before hydration for v-model.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch edison/fix/14403

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Feb 4, 2026 •

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 108 kB (+308 B) 40.7 kB (+112 B) 36.5 kB (+121 B)
vue.global.prod.js 166 kB (+308 B) 60.8 kB (+97 B) 54 kB (+117 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 49.7 kB 19.3 kB 17.7 kB
createApp 57.8 kB 22.3 kB 20.4 kB
createSSRApp 62.5 kB 24.3 kB 22.1 kB
defineCustomElement 64.1 kB 24.3 kB 22.1 kB
overall 72.1 kB 27.5 kB 25.1 kB

@edison1105 edison1105 added scope:hydration 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Feb 4, 2026
@pkg-pr-new

pkg-pr-new Bot commented Feb 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@14411
npm i https://pkg.pr.new/@vue/compiler-core@14411
yarn add https://pkg.pr.new/@vue/compiler-core@14411.tgz

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@14411
npm i https://pkg.pr.new/@vue/compiler-dom@14411
yarn add https://pkg.pr.new/@vue/compiler-dom@14411.tgz

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@14411
npm i https://pkg.pr.new/@vue/compiler-sfc@14411
yarn add https://pkg.pr.new/@vue/compiler-sfc@14411.tgz

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@14411
npm i https://pkg.pr.new/@vue/compiler-ssr@14411
yarn add https://pkg.pr.new/@vue/compiler-ssr@14411.tgz

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@14411
npm i https://pkg.pr.new/@vue/reactivity@14411
yarn add https://pkg.pr.new/@vue/reactivity@14411.tgz

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@14411
npm i https://pkg.pr.new/@vue/runtime-core@14411
yarn add https://pkg.pr.new/@vue/runtime-core@14411.tgz

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@14411
npm i https://pkg.pr.new/@vue/runtime-dom@14411
yarn add https://pkg.pr.new/@vue/runtime-dom@14411.tgz

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@14411
npm i https://pkg.pr.new/@vue/server-renderer@14411
yarn add https://pkg.pr.new/@vue/server-renderer@14411.tgz

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@14411
npm i https://pkg.pr.new/@vue/shared@14411
yarn add https://pkg.pr.new/@vue/shared@14411.tgz

vue

pnpm add https://pkg.pr.new/vue@14411
npm i https://pkg.pr.new/vue@14411
yarn add https://pkg.pr.new/vue@14411.tgz

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@14411
npm i https://pkg.pr.new/@vue/compat@14411
yarn add https://pkg.pr.new/@vue/compat@14411.tgz

commit: db6b302

@edison1105

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	packages/runtime-dom/src/directives/vModel.ts

Co-authored-by: edison1105 <3705199+edison1105@users.noreply.github.com>

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in ce047b3. The conflict was in vModelSelect.created — main had refactored it to use an inline change handler, so I merged that with our hydration logic preserved in mounted. Also cleaned up the now-unused hydrationSelectKey symbol.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
packages/runtime-core/__tests__/hydration.spec.ts (2)

1722-1745: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Synchronize an initially undefined checkbox model.

The false initializer does not cover an initially undefined reactive model. vModelCheckbox.setChecked() returns at value === oldValue before it compares el.checked during hydration, so a user-checked control remains checked while the model remains undefined. Add this regression case and reconcile hydration state before that fast path. (raw.githubusercontent.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/runtime-core/__tests__/hydration.spec.ts` around lines 1722 - 1745,
Extend the hydration regression test around “preserves pre-hydration checkbox
v-model state” with an initially undefined reactive model, and update
vModelCheckbox.setChecked() so hydration reconciles el.checked against the model
before returning on value === oldValue. Preserve the existing fast path after
this comparison while ensuring the model and control become synchronized.

1779-1808: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve raw option values during hydration.

The string-only options do not cover :value bindings. vModelSelect snapshots the selected DOM value in the parent created hook before child <option> nodes receive _value; an edited <option :value="2"> therefore writes "2" to the model, and an object binding writes its DOM string value. Add numeric and object :value edit cases. Capture selected option indices during created, then resolve raw values after option hydration. (raw.githubusercontent.com)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/runtime-core/__tests__/hydration.spec.ts` around lines 1779 - 1808,
Extend the hydration coverage in the existing select v-model test area to
include edited selections using numeric and object-bound option values via
:value, asserting the model receives the raw bound values after hydration.
Update the vModelSelect hydration flow so its parent created hook captures
selected option indices before child options receive _value, then resolves those
indices to raw option values after option hydration instead of persisting DOM
string values.
packages/runtime-dom/src/directives/vModel.ts (3)

197-223: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the native radio value during hydration.

For a radio without a value attribute, vnode.props!.value is undefined, while getValue(el) returns "on". Use one getValue(el) result for the checked comparison and assignment to preserve pre-hydration selection.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/runtime-dom/src/directives/vModel.ts` around lines 197 - 223, Update
vModelRadio.created to compute one native value via getValue(el), then use it
for both the checked comparison and the hydration assign call instead of
vnode.props!.value. Preserve the existing hydration behavior and cleanup.

154-185: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Run hydration reconciliation before the unchanged-value return.

When the scalar checkbox model and oldValue are both undefined, a pre-hydration user check is ignored because setCheckboxValue does not run. Guard the fast path with !hydrating.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/runtime-dom/src/directives/vModel.ts` around lines 154 - 185, The
setChecked function has an early return path when both the model value and
oldValue are undefined, but this prevents setCheckboxValue from executing during
hydration, causing pre-hydration user checks to be skipped. Update the
early-return condition in setChecked to guard against hydration by adding a
!hydrating check, so that when hydrating is true the function continues to call
setCheckboxValue instead of returning early.

340-350: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Compare multiple-select arrays as unordered multisets.

getSelectedValue returns values in DOM order, while looseEqual compares arrays by index. During hydration, a model such as ['b', 'a'] can therefore be rewritten as ['a', 'b'] when the selected set is unchanged. Use duplicate-safe, order-insensitive comparison and add a regression test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/runtime-dom/src/directives/vModel.ts` around lines 340 - 350, Update
isSelectValueEqual to compare multi-select array values as unordered,
duplicate-safe multisets rather than by index, preserving matching
multiplicities while ignoring order. Ensure hydration does not rewrite an
unchanged model solely because DOM order differs, and add a regression test
covering reversed values and duplicates.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/runtime-dom/src/directives/vModel.ts`:
- Around line 264-274: Update the hydration logic in the select v-model mounted
hook to avoid assigning the browser’s native first-option selection when the
model is nullish and SSR emitted no matching option; ensure setSelected restores
the nullish model instead. Preserve only a selection that genuinely differs from
the server/default state, and add a regression test covering a nullish model
with a placeholder option.

---

Outside diff comments:
In `@packages/runtime-core/__tests__/hydration.spec.ts`:
- Around line 1722-1745: Extend the hydration regression test around “preserves
pre-hydration checkbox v-model state” with an initially undefined reactive
model, and update vModelCheckbox.setChecked() so hydration reconciles el.checked
against the model before returning on value === oldValue. Preserve the existing
fast path after this comparison while ensuring the model and control become
synchronized.
- Around line 1779-1808: Extend the hydration coverage in the existing select
v-model test area to include edited selections using numeric and object-bound
option values via :value, asserting the model receives the raw bound values
after hydration. Update the vModelSelect hydration flow so its parent created
hook captures selected option indices before child options receive _value, then
resolves those indices to raw option values after option hydration instead of
persisting DOM string values.

In `@packages/runtime-dom/src/directives/vModel.ts`:
- Around line 197-223: Update vModelRadio.created to compute one native value
via getValue(el), then use it for both the checked comparison and the hydration
assign call instead of vnode.props!.value. Preserve the existing hydration
behavior and cleanup.
- Around line 154-185: The setChecked function has an early return path when
both the model value and oldValue are undefined, but this prevents
setCheckboxValue from executing during hydration, causing pre-hydration user
checks to be skipped. Update the early-return condition in setChecked to guard
against hydration by adding a !hydrating check, so that when hydrating is true
the function continues to call setCheckboxValue instead of returning early.
- Around line 340-350: Update isSelectValueEqual to compare multi-select array
values as unordered, duplicate-safe multisets rather than by index, preserving
matching multiplicities while ignoring order. Ensure hydration does not rewrite
an unchanged model solely because DOM order differs, and add a regression test
covering reversed values and duplicates.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b86696c9-8d5a-4ab4-8244-58fb77bf661f

📥 Commits

Reviewing files that changed from the base of the PR and between 060199c and ce047b3.

📒 Files selected for processing (3)
  • packages/runtime-core/__tests__/hydration.spec.ts
  • packages/runtime-core/src/hydration.ts
  • packages/runtime-dom/src/directives/vModel.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/runtime-core/src/hydration.ts

Comment on lines 264 to 274
mounted(el, { value, modifiers: { number } }) {
const hydrating = el[hydratingKey]
delete el[hydratingKey]
if (hydrating) {
const selectedValue = getSelectedValue(el, number, isSet(value))
if (!isSelectValueEqual(selectedValue, value)) {
el[assignKey] && el[assignKey](selectedValue)
return
}
}
setSelected(el, value)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- candidate files ---'
git ls-files | rg '(^|/)(vModel|ssrVModel|select|hydration|hydrate).*|runtime-dom.*test|compiler-ssr.*test' | head -200

printf '%s\n' '--- vModel symbols ---'
rg -n -C 8 'mounted\(el|hydratingKey|assignKey|getSelectedValue|isSelectValueEqual|setSelected' packages/runtime-dom/src/directives/vModel.ts

printf '%s\n' '--- SSR vModel transform references ---'
rg -n -C 8 'ssrVModel|v-model|selected|option' packages/compiler-ssr packages/runtime-dom --glob '*.{ts,js}' | head -300

Repository: vuejs/core

Length of output: 1999


🌐 Web query:

site:github.com/vuejs/core packages/runtime-dom/src/directives/vModel.ts hydratingKey getSelectedValue isSelectValueEqual mounted

💡 Result:

The components and functions you mentioned are part of the hydration-aware infrastructure recently introduced in Vue.js (specifically within packages/runtime-dom/src/directives/vModel.ts) to preserve user-entered values during the SSR hydration process [1][2]. These additions ensure that native form controls (like , , and ) maintain user input that may have occurred after the page loaded but before Vue's hydration finished [1][2]. Key details regarding these elements include: HydratingKey: This is used to track the hydration state of an element within the v-model directive. It allows the framework to detect if an element is currently undergoing hydration, enabling it to conditionally preserve user-edited values rather than overwriting them with the initial model value [1][2]. getSelectedValue and isSelectValueEqual: These are helper utilities implemented to handle input hydration [1][2]. getSelectedValue extracts the current selected values from the DOM, while isSelectValueEqual provides a mechanism to compare these existing DOM values with the expected model value, ensuring that the reconciliation process during hydration correctly decides whether an update is necessary [1][2]. Mounted Hook: The mounted hook in v-model directives, now updated to be hydration-aware, participates in this process by receiving an isHydrating flag [1][2]. This allows the directive to perform initialization logic—such as setting the initial selected state or value—only when appropriate, preventing the clobbering of pre-existing user input [1][2]. These changes were part of a broader effort to improve the stability of forms in server-side rendered applications, ensuring that user interaction during the "rehydration gap" is not lost [1][2]. Citations: 1: https://github.com//issues/14411/linked_closing_reference?reference_location=REPO_ISSUES_INDEX 2: https://github.com//pull/14411 🌐 Web query: site:github.com/vuejs/core packages/compiler-ssr/src/transforms/ssrVModel.ts null undefined select option selected hydration 💡 Result: In Vue.js, the packages/compiler-ssr/src/transforms/ssrVModel.ts file is responsible for transforming v-model directives during Server-Side Rendering (SSR) [1][2]. Specifically, for <select> elements, this file manages the logic to determine which <option> should have the selected attribute applied based on the bound v-model value [3][4]. Historical issues identified that when <option> elements were rendered using v-for or v-if directives, the SSR compiler failed to correctly inject the selected attribute [5][6][4]. This led to a mismatch where the server-rendered HTML did not reflect the initial selected state, causing incorrect UI rendering until the client-side hydration process corrected it [6][7]. To address this, several improvements have been implemented in ssrVModel.ts and related utilities [3][4]: 1. Recursive Processing: The compiler was updated to use a processSelectChildren helper function, which recursively traverses element, v-for, and v-if nodes nested within a <select> tag to ensure all potential options are evaluated [8][4]. 2. Value Extraction: Enhancements were made to how option values are extracted—supporting not only explicit value bindings but also v-text directives and text content (including interpolations)—to correctly compare them against the v-model value [2][3]. 3. Shared Utilities: The logic for processing select children and finding value bindings was refactored into shared utility functions, improving maintainability and ensuring consistent behavior between standard and dynamic (e.g., v-for) options [3][8]. These changes ensure that the selected attribute is correctly rendered on the server, preventing hydration issues where the DOM state would appear to change after the initial page load [2][9][4]. Citations: 1: https://github.com/vuejs/core/blob/7df0edd4/packages/compiler-ssr/src/transforms/ssrVModel.ts 2: https://github.com//pull/13963 3: https://github.com//pull/13539 4: https://github.com//pull/13487 5: https://github.com//pull/12399 6: https://github.com//issues/12395 7: https://github.com//issues/13528 8: https://github.com//issues/13487 9: https://github.com/vuejs/core/compare/v3.5.13...v3.5.17 🏁 Script executed: #!/bin/bash set -eu base='https://raw.githubusercontent.com/vuejs/core/main' for file in \ packages/runtime-dom/src/directives/vModel.ts \ packages/compiler-ssr/src/transforms/ssrVModel.ts \ packages/runtime-dom/__tests__/directives/vModel.spec.ts \ packages/runtime-dom/__tests__/directives/vModelSelect.spec.ts \ packages/server-renderer/__tests__/ssrDirectives.spec.ts do printf '\n--- %s ---\n' "$file" curl -fsSL "$base/$file" | rg -n -C 12 \ 'hydratingKey|assignKey|getSelectedValue|isSelectValueEqual|mounted\(el|setSelected|processSelectChildren|selected|v-model' done Repository: vuejs/core Length of output: 1999 🌐 Web query: "const selectedValue = getSelectedValue(el, number, isSet(value))" Vue 💡 Result: The code snippet provided, const selectedValue = getSelectedValue(el, number, isSet(value)), is not a standard or built-in function call within the Vue.js framework itself [1][2][3]. Based on technical context and common development patterns: 1. isSet: This is a utility function found in the internal Vue core source code (@vue/shared) [1][4]. It is used to check if a value is a JavaScript Set object (e.g., isSet(val) returns true if the value is a Set) [1][3]. It is generally intended for internal framework use, not as a standard API for component development [2][5]. 2. getSelectedValue: This is not a Vue built-in method. It is a common name for a custom developer-defined function used to extract or process the selected value from a component (such as a dropdown, select list, or custom input) [6][7][8]. 3. Context: The implementation you are looking at is likely custom logic within a specific project or a third-party UI library component that handles form selection data [6][7][8]. If you are encountering this in a codebase, it is recommended to search your project files for the definition of getSelectedValue to understand its specific behavior, as its functionality depends entirely on how the author implemented it [8]. If you are trying to handle selected values in a standard Vue application, typically you should use v-model to bind the selected value directly to a data property rather than calling manual helper functions [9][10][11]. Citations: 1: https://github.com/vuejs/core/blob/main/packages/shared/src/general.ts 2: https://app.unpkg.com/@vue/shared@3.4.15/files/dist/shared.d.ts 3: https://segmentfault.com/a/1190000042073070/en 4: https://www.mo4tech.com/read-the-utility-functions-in-vue.html 5: https://fossies.org/linux/vue-core/packages/shared/src/general.ts 6: https://github.com/TotomInc/vue3-select-component/blob/master/src/Select.vue 7: https://github.com/Tencent/tdesign-vue-next/blob/f7847bd1/packages/components/select/select.tsx 8: https://www.cnblogs.com/yay-xax/p/18711814 9: https://stackoverflow.com/questions/72481973/how-to-access-the-object-from-a-v-select 10: https://github.com/navidrezadoost/Smilodon/blob/main/packages/vue/README.md 11: https://cloud.tencent.com/developer/ask/sof/107013991 🌐 Web query: "if (!isSelectValueEqual(selectedValue, value))" Vue vModel 💡 Result: The expression if (!isSelectValueEqual(selectedValue, value)) is not a standard part of the public Vue.js API for creating components or using v-model. Instead, isSelectValueEqual is an internal utility function used within Vue's core source code (specifically in packages/runtime-dom/src/directives/vModel.ts) to handle equality checks for native HTML select elements during v-model hydration [1][2]. For custom component v-model implementations in Vue 3, Vue handles equality and reactivity automatically via defineModel() or the standard modelValue prop and update:modelValue event pattern [3][4]. If you are implementing custom equality logic (e.g., to prevent unnecessary updates when binding objects), the recommended approach is: 1. Use defineModel() (the modern approach) or standard props and events to manage the state [3][4]. 2. If you need to avoid unnecessary re-renders or circular updates when working with complex objects, perform the equality check manually inside a watcher or within the setter of a computed property before emitting the update event [5]. 3. For custom objects, ensure you are using deep equality checks if the standard strict equality (===) is insufficient for your use case [5]. In summary, isSelectValueEqual is an internal implementation detail and should not be relied upon in application-level code [1][2]. You should implement your own comparison logic based on your specific data requirements [5]. Citations: 1: https://github.com//pull/14411 2: https://github.com/vuejs/core/blob/7df0edd4/packages/runtime-dom/src/directives/vModel.ts 3: https://vuejs.org/guide/components/v-model.html 4: https://vue-doc.vercel.app/components-in-depth/component-v/ 5: https://dev.to/kouts/how-to-use-an-object-with-v-model-in-vue-ea6 🌐 Web query: Vue core PR 14411 v-model select hydration null undefined default option 💡 Result: Vue.js PR 14411 addresses an issue where user input entered into native form controls (including select elements) before server-side rendering (SSR) hydration completes was being reset to default values upon hydration [1][2][3]. While the PR is specifically designed to preserve user-edited values during the hydration process—ensuring that what a user types or selects while the page is still loading remains intact—it is part of a broader set of improvements related to how Vue handles SSR-rendered select elements and v-model state [1][2]. Other related issues and fixes have addressed distinct problems, such as SSR rendering of initial selected states with v-for/v-if [4][5] and synchronization issues when v-model is programmatically overridden [6]. If you are encountering unexpected behavior with null or undefined values in a select element, note the following: 1. Hydration Persistence: PR 14411 ensures that if a user interacts with a select element while the page is hydrating, their selection is preserved rather than overwritten by the initial state [1]. 2. SSR Select Defaults: Issues involving incorrect selected attributes in SSR output (e.g., when options lack explicit value attributes or use v-for) are generally tracked and addressed in separate PRs like #13487 and #12399 [4][5]. 3. Native Behavior: If a select element's v-model is bound to a value that does not match any of its options, native HTML behavior (which Vue follows) typically results in the select appearing empty or resetting to undefined, depending on the specific implementation [7][8]. If you are experiencing a specific bug where a select resets to null or undefined specifically after hydration completes, verify if your code is hitting a state where the bound model value loses its sync with the rendered options, or if this behavior persists after updating to a version containing the fixes from #14411 [1][3]. Citations: 1: https://github.com//pull/14411 2: https://github.com//issues/14403 3: https://github.com//issues/14411/linked_closing_reference?reference_location=REPO_ISSUES_INDEX 4: https://github.com//pull/13487 5: https://github.com//pull/12399 6: https://github.com//pull/14960 7: https://github.com/vuejs/vue/issues/4524 8: https://github.com//issues/3469 🌐 Web query: site:github.com/vuejs/core "hydratingKey" "vModel" test select 💡 Result: The term "hydratingKey" does not appear as a standard public API or documented feature in the Vue.js framework. It is likely an internal implementation detail, a misspelling, or a reference to internal logic related to hydration and element keys. Research into Vue.js hydration and v-model select testing reveals the following technical context: 1. Hydration and v-model: Recent updates to Vue.js (specifically around PR #14411) have introduced "hydration-aware" v-model directive handling [1][2]. This ensures that user input (including selections in elements) entered during the hydration phase is preserved once hydration completes, rather than being reset to the default value [1][2]. This logic involves internal hydration state management [1]. 2. Testing v-model with Select: Testing elements with v-model in Vue.js typically involves: - Using test utilities (e.g., in runtime-dom/tests/directives/vModel.spec.ts) to simulate user interactions like change events [3][4]. - Verifying that the bound data matches the selected option(s) [3][4]. - Ensuring that the DOM accurately reflects the bound state, especially for or when handling numeric values [5][3][4]. - Checking for edge cases, such as when the v-model update is overridden by a handler [4]. 3. Hydration Tests: Official Vue.js tests for hydration (in runtime-core/tests/hydration.spec.ts) use utilities like mountWithHydration to verify that server-rendered markup correctly binds to Vue components upon hydration, including cases with dynamic properties, non-string values, and input elements [6]. If you encountered "hydratingKey" in a specific error message or codebase, it may be a reference to an internal tracking key or property used during the hydration reconciliation process, potentially related to how Vue distinguishes between DOM nodes or preserves their state [1][7].

Citations:


🌐 Web query:

https://github.com/vuejs/core/pull/14411 files vModel.ts select hydration

💡 Result:

Pull Request #14411 in the Vue.js core repository is an initiative to ensure that user inputs, including select elements, are preserved when they occur during the server-side rendering (SSR) hydration phase [1]. Currently, if a user begins interacting with an input bound by v-model while a page is still hydrating, the input's value can be reset to the default value defined by the application once hydration completes, leading to a loss of user input [2]. This issue is particularly noticeable on slower connections [2]. The key aspects of PR #14411 include: - Hydration-Aware Directives: It introduces hydration-aware behavior to v-model directives, allowing them to detect and preserve user-edited values during the hydration process [1]. - Context Updates: It extends directive hooks to receive an isHydrating flag and updates the hydration flow to pass this context [1]. - Logic Implementation: It updates packages/runtime-dom/src/directives/vModel.ts to track values during hydration and uses helper utilities to conditionally preserve or reapply user-edited values, covering text, checkbox, radio, and select elements [1]. - Test Coverage: The PR includes comprehensive tests within packages/runtime-core/tests/hydration.spec.ts to verify that pre-hydration input values are correctly maintained after hydration completes [1]. This PR was created to address issue #14403, which reports the problem of input values being reset during the hydration phase [1][2]. Other related PRs in the repository, such as #14960, also focus on the behavior of select elements and v-model synchronization, specifically regarding cases where v-model values are overridden during change events [3].

Citations:


🌐 Web query:

site:github.com/vuejs/core/pull/14411 "select" "hydration" "v-model"

💡 Result:

In Vue, v-model handles hydration for select elements by ensuring that user-edited values are preserved during the transition from server-side rendering (SSR) to client-side interactivity [1]. When a page is rendered on the server, the initial state is sent as HTML [1]. If a user interacts with a select element before the JavaScript has fully hydrated the page, the v-model directive is designed to detect and maintain the user's input [1]. Recent improvements to the Vue core framework have introduced hydration-aware v-model logic that explicitly tracks and preserves these values for select elements, as well as text inputs, checkboxes, and radio buttons, during the hydration lifecycle [1]. This ensures that the state after hydration remains consistent with the user's actual input rather than resetting to the server-provided state [1]. For developers, this means that standard usage of v-model on select elements will correctly handle hydration without requiring manual intervention, provided you are using a modern version of Vue that includes these hydration-aware fixes [1].

Citations:


🌐 Web query:

site:github.com/vuejs/core/blob/7df0edd4/packages/runtime-dom/src/directives/vModel.ts "setSelected"

💡 Result:

setSelected is a common method name in various programming frameworks used to programmatically change the selection state of a user interface element [1]. In the context of the Vue.js framework, for example, setSelected is an internal helper function used to synchronize the selected state of HTML elements within a element to match a bound data value [1]. This function handles both single and multiple selection modes, iterating through options to update their selected property based on whether their values match the provided input [1]. In other UI frameworks, such as those found in Java (e.g., Swing components like JRadioButton or JCheckBox) or Android development (View class), setSelected is a standard method used to toggle the active or highlighted state of a UI component. When called, it typically marks the component as selected, which may trigger UI updates like changing the visual appearance or informing a listener that the state has changed. Citations: 1: https://github.com/vuejs/core/blob/7df0edd4/packages/runtime-dom/src/directives/vModel.ts 🌐 Web query: site:github.com/vuejs/core/blob/7df0edd4/packages/runtime-dom/__tests__/directives/vModel.spec.ts "hydration" 💡 Result: Hydration is the process of providing or maintaining the body's water content, which is essential for survival as water serves as a critical nutrient, a medium for chemical reactions, a structural component, and a key factor in thermoregulation and waste transport [1][2]. Humans maintain fluid balance through complex homeostatic mechanisms that regulate water intake and loss, primarily triggered by minute changes in plasma osmolarity [1][3]. Recommended Intake Water requirements are highly individual and depend on factors such as age, sex, weight, physical activity level, climate, and diet [4][5][3]. While the World Health Organization (WHO) often uses an assumed intake of 2 liters per day for adults when calculating drinking water guidelines, there is no single universal requirement [6]. Authoritative bodies such as the National Academies of Sciences, Engineering, and Medicine (NASEM) have provided adequate intake (AI) values of approximately 3.7 liters for men and 2.7 liters for women per day from all beverages and foods for adults aged 19 to 30 years [5]. These values are guidelines to prevent dehydration and ensure optimal function rather than strict minimums, as fluid needs fluctuate based on environment and physiology [5][3]. Dehydration and Overhydration Dehydration occurs when the body lacks sufficient water, leading to potential health issues such as impaired consciousness, muscle weakness, orthostatic hypotension, and tachycardia [1]. For physically active individuals, maintaining hydration is critical to performance; a goal is to prevent body mass loss exceeding 2% during activity [7]. Conversely, excessive fluid intake can be dangerous. Excessive water consumption, particularly in older adults or during prolonged physical activity, can lead to exercise-associated hyponatremia (EAH), a condition involving dangerously low blood sodium levels [7][8]. Strategies to promote safety include consuming fluids based on personal sweat rates and thirst cues rather than following rigid, excessive consumption patterns [7]. In clinical settings, oral rehydration therapy (ORT) using solutions containing specific ratios of water, salts, and sometimes carbohydrates is the preferred treatment for mild-to-moderate dehydration [8]. Citations: 1: https://www.academia.edu/53736590/Water_hydration_and_health 2: https://dukespace.lib.duke.edu/server/api/core/bitstreams/736e264a-c077-46dc-8e21-5256f586133f/content 3: https://www.academia.edu/127537263/Variation_in_human_water_turnover_associated_with_environmental_and_lifestyle_factors 4: https://www.ncbi.nlm.nih.gov/sites/books/NBK562207/ 5: https://pmc.ncbi.nlm.nih.gov/articles/PMC10710856/ 6: https://iris.who.int/server/api/core/bitstreams/ee809f3c-d909-4138-9242-002bce630853/content 7: https://pmc.ncbi.nlm.nih.gov/articles/PMC5634236/ 8: https://www.ncbi.nlm.nih.gov/sites/books/n/statpearls/article-37754/ 🌐 Web query: "ssrRenderAttr(\"selected\"" Vue ssrVModel 💡 Result: In Vue SSR (Server-Side Rendering), the ssrRenderAttr helper is primarily used to render standard attributes [1][2]. For elements using v-model, the server-side rendering process dynamically determines the selected state of elements by comparing the select's model value against the option's value [3][4][5]. Historically, Vue did not automatically add the selected attribute to elements during SSR, which could lead to issues with initial page display when JavaScript was disabled [6]. However, recent improvements in the Vue core compiler have introduced logic to resolve this [5][7][8]. Key technical aspects include: 1. SSR Codegen Logic: During compilation, the ssrVModel transform analyzes the element and its children [3]. If it detects v-model, it generates code that uses helper functions like ssrLooseEqual or ssrLooseContain to compare the select model value with each option's value [3][4][5]. 2. Attribute Injection: Instead of using ssrRenderAttr directly for the selected state, the compiler injects a conditional expression into the tag's SSR output [3][4]. This expression uses the ssrIncludeBooleanAttr helper to determine if the " selected" string should be appended to the rendered tag [3][4][5]. 3. Evolution: Support for this feature has been expanded significantly. While early versions of Vue 3 struggled with this, especially when using v-for, v-if, or non-bound option values, recent PRs (such as #12399 and #13963) have extended the compiler to derive option values from various sources, including:value bindings, text nodes, interpolations, and v-text directives [9][7][8]. This ensures that the correct option is marked as selected in the initial HTML string sent to the browser, improving accessibility and behavior for users without client-side hydration [7][8]. Citations: 1: https://github.com/vuejs/core/blob/7df0edd4/packages/server-renderer/src/helpers/ssrRenderAttrs.ts 2: https://github.com/vuejs/core/blob/7df0edd4/packages/compiler-ssr/src/runtimeHelpers.ts 3: https://github.com/vuejs/core/blob/7df0edd4/packages/compiler-ssr/src/transforms/ssrVModel.ts 4: https://github.com/vuejs/core/blob/7df0edd4/packages/compiler-ssr/__tests__/ssrVModel.spec.ts 5: https://github.com//pull/13539 6: https://github.com//issues/5339 7: https://github.com//pull/13963 8: https://github.com//pull/12399 9: https://github.com//issues/12395 🌐 Web query: "el[hydratingKey]" Vue 💡 Result: In the context of Vue's source code, el[hydratingKey] is not a public API but rather an internal pattern used within the framework's runtime hydration logic [1][2]. The expression refers to accessing properties on a DOM element (el) during the hydration process—the phase where Vue reconciles server-rendered static HTML with the client-side virtual DOM [3][4]. Vue's internal hydration code often needs to check element properties or attributes to verify consistency between the server-rendered DOM and the expected client-side output [1][5]. Specifically, this pattern appears in codebases related to: 1. Hydration Mismatch Detection: When Vue needs to validate attributes that cannot be reliably checked via standard methods like el.hasAttribute(key) (such as the value property on a textarea element), it accesses the property directly on the element using index access notation [6][5]. 2. Internal Patching: The framework uses this to access specific properties on the DOM element that require manual synchronization or patching during the hydration cycle [1][2]. If you encountered this in a stack trace or debugger while working on a Vue application, it indicates that the framework is currently performing a consistency check or patch operation on a DOM node during the initial load [4]. This is standard behavior and does not typically require user intervention unless you are seeing frequent hydration mismatch warnings, which should be addressed by ensuring consistent rendering between server and client [4]. For state synchronization across the hydration boundary in Nuxt applications, the standard public API is useHydration, which is entirely separate from this internal el[hydratingKey] mechanism [7][8]. Citations: 1: https://github.com/vuejs/core/blob/main/packages/runtime-core/src/hydration.ts 2: https://github.com/vuejs/core/blob/d61d8031/packages/runtime-core/src/hydration.ts 3: https://v2.ssr.vuejs.org/guide/hydration 4: https://vuejs.org/guide/scaling-up/ssr.html 5: https://github.com//pull/10004 6: https://github.com//pull/10060 7: https://nuxt.com/docs/4.x/api/composables/use-hydration 8: https://nuxt.com/docs/3.x/api/composables/use-hydration 🌐 Web query: "hydratingKey = true" "vModel.ts" 💡 Result: In the context of the Vue.js source code (specifically packages/runtime-dom/src/directives/vModel.ts), the concept of hydratingKey being set to true is related to a recent improvement in how v-model directives handle server-side rendered (SSR) content [1][2]. Specifically, this change was introduced to ensure that user input made on native form elements (like text inputs, checkboxes, radio buttons, and select elements) before the hydration process completes is preserved [1][2]. When a page is rendered on the server and sent to the client, a user might interact with the form before Vue has fully "hydrated" the DOM. Previously, this could lead to the user's input being overwritten or lost when Vue's own reactive state took over [2]. To solve this, the Vue core team: 1. Extended the directive hook system (e.g., created, beforeMount, mounted) to accept an optional isHydrating flag [1][2]. 2. Updated the hydration flow to pass isHydrating = true during this specific lifecycle phase [1][2]. 3. Implemented logic within v-model directives to detect and conditionally preserve these pre-hydration values [1][2]. While you may see code referencing hydration state or similar flags in the v-model directive logic, this mechanism is an internal part of the framework's hydration strategy to ensure a seamless experience between server-generated markup and client-side interactivity [1][3][2]. Citations: 1: https://github.com//pull/14411 2: https://github.com//issues/14411/linked_closing_reference?reference_location=REPO_ISSUES_INDEX 3: https://github.com/vuejs/core/blob/d61d8031/packages/runtime-core/src/hydration.ts 🌐 Web query: "ssrVModel" "isSet(value)" Vue 💡 Result: In Vue, there is no single function or API named ssrVModel.isSet(value). These terms refer to two distinct parts of the Vue core codebase: 1. ssrVModel: This is a internal transform/compiler concept (located in @vue/compiler-ssr) used to handle v-model directives during Server-Side Rendering (SSR) [1][2]. It generates the code necessary to correctly render input, textarea, and select elements with v-model bindings on the server [1][3][4]. For example, it ensures that select elements render the correct selected attribute for options by comparing the model value against the option value [1][3][2]. 2. isSet(value): This is a utility function exported from @vue/shared (and used within the @vue/reactivity package) [5][6]. It is a standard type-check utility used to determine if a value is a native JavaScript Set object [5][6]. It is frequently used in Vue's reactivity system, such as in the traverse function within watch, to ensure that the reactivity system correctly iterates over Set collections [5][6][7]. There is no programmatic connection or function combining these two names. If you encountered them together in a stack trace or code analysis, it is likely that you were looking at separate internal Vue modules or separate branches of a call stack. Citations: 1: https://github.com/vuejs/core/blob/7df0edd4/packages/compiler-ssr/src/transforms/ssrVModel.ts 2: https://fossies.org/linux/vue-core/packages/compiler-ssr/src/transforms/ssrVModel.ts 3: https://github.com/vuejs/core/blob/7df0edd4/packages/compiler-ssr/__tests__/ssrVModel.spec.ts 4: https://coverage.vuejs.org/server-renderer/src/helpers/ssrvmodelhelpers.ts 5: https://github.com/vuejs/core/blob/main/packages/reactivity/src/watch.ts 6: https://github.com/vuejs/core/blob/7df0edd4/packages/reactivity/src/watch.ts 7: https://github.com/vuejs/core/blob/985bd2bcb5fd8bccd1c15c8c5d89a6919fd73922/packages/runtime-core/src/apiWatch.ts 🌐 Web query: MDN HTML select no selected option first option selected single select 💡 Result: In a standard HTML single-select element (where the multiple attribute is not specified), the browser automatically selects the first option element if no other option is explicitly marked with the selected attribute [1][2]. Key behaviors: 1. Default Selection: If no selected attribute is provided in the markup, the first option is chosen by default [1][2]. 2. SelectedIndex: For a single-select element, the selectedIndex property of the HTMLSelectElement interface will return the index of the selected option, which is 0 if the first option is selected by default [3][4]. 3. Programmatic Control: If you wish to have no option selected initially, you must either remove all option elements or manipulate the DOM to deselect options (e.g., setting selectedIndex to -1), though in many browser implementations, a single-select box will revert to selecting the first available option unless an empty or placeholder option is provided [3][4]. To avoid unintended selection of the first item, it is a common web development practice to include an initial placeholder option, such as: Select an option Option 1

Citations:


🌐 Web query:

site:github.com/vuejs/core/pull/14411 "null" "undefined" select

💡 Result:

Let me search more specifically for PR #14411:I wasn't able to find the specific PR #14411 in the search results. Let me try a more direct search:I apologize, but I wasn't able to find the specific PR #14411 from vuejs/core through web searches. The search results returned related issues about null/undefined values in select elements, but not the specific pull request you're looking for.

To access PR #14411 directly, you can visit: https://github.com/vuejs/core/pull/14411

If you'd like, you can share more details about what you're looking for regarding that PR, and I can try to help you with information about the issue or search for related discussions.


🌐 Web query:

site:github.com/vuejs/core/issues/14403 select first option hydration v-model

💡 Result:

There is a known issue in Vue.js where user input provided during the hydration phase can be overwritten by the v-model binding once the application has fully mounted [1]. This behavior occurs because the framework may reset the input value to the default state defined in the v-model binding after hydration completes, which can impact user experience in select elements and other form controls if a user interacts with them while resources are still loading [1]. While there is no specific documentation that isolates a problem exclusively with selecting the first option of a select element, the general hydration behavior affects native controls that use v-model [1]. To mitigate this issue in environments with slow network conditions, some developers implement patterns that block form interactions or defer initialization until the mounted hook has fired [1]. Ongoing efforts in the Vue core repository aim to improve the preservation of pre-hydration user input across native controls [1].

Citations:


Do not treat the native default selection as user input.

For a single-select with a null or undefined model, SSR emits no matching selected option. The browser selects the first option. Hydration then assigns that option through el[assignKey] and returns before setSelected(el, value) restores the nullish model.

Add a regression test with a nullish model and a placeholder option. Preserve only a selection that differs from the server/default state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/runtime-dom/src/directives/vModel.ts` around lines 264 - 274, Update
the hydration logic in the select v-model mounted hook to avoid assigning the
browser’s native first-option selection when the model is nullish and SSR
emitted no matching option; ensure setSelected restores the nullish model
instead. Preserve only a selection that genuinely differs from the
server/default state, and add a regression test covering a nullish model with a
placeholder option.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/runtime-dom/src/directives/vModel.ts`:
- Around line 65-69: Update the hydration reconciliation in the vModel
directive’s created and mounted paths to include HTMLTextAreaElement instances
alongside text inputs. Record the server baseline with textarea-specific
line-break normalization that preserves unchanged textarea newlines, and compare
against it so pre-hydration edits are retained. Add hydration tests covering
edited and unchanged-newline textarea cases in hydration.spec.ts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d1c58b1-769b-459e-99e5-1c55e80711c5

📥 Commits

Reviewing files that changed from the base of the PR and between ce047b3 and dbc9737.

📒 Files selected for processing (3)
  • packages/runtime-core/__tests__/hydration.spec.ts
  • packages/runtime-dom/__tests__/directives/vModel.spec.ts
  • packages/runtime-dom/src/directives/vModel.ts

@edison1105 edison1105 changed the title fix(v-model): preserve pre-hydration user input across native controls v-model: preserve text input before hydration Aug 4, 2026
@edison1105 edison1105 changed the title v-model: preserve text input before hydration fix(v-model): preserve text input before hydration Aug 4, 2026
@edison1105

Copy link
Copy Markdown
Member Author

/ecosystem-ci run

@vue-bot

vue-bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📝 Ran ecosystem CI: Open

suite result latest scheduled
router ✅ success ✅ success
pinia ✅ success ✅ success
language-tools ✅ success ❌ failure
vant ✅ success ✅ success
radix-vue ✅ success ❌ failure
vite-plugin-vue ✅ success ✅ success
quasar ✅ success ✅ success
nuxt ✅ success ❌ failure
vueuse ✅ success ❌ failure
vuetify ✅ success ✅ success
test-utils ✅ success ✅ success
vue-simple-compiler ✅ success ✅ success
vitepress ✅ success ✅ success
vue-i18n ✅ success ✅ success
vue-macros ✅ success ✅ success
primevue ✅ success ✅ success

@edison1105
edison1105 merged commit 2468464 into main Aug 4, 2026
16 checks passed
@edison1105
edison1105 deleted the edison/fix/14403 branch August 4, 2026 23:57
ahacop added a commit to changebot-ai/widgets that referenced this pull request Aug 24, 2026
[cb skip]

vue is a dev dependency of @changebot/widgets-vue. The peer range
stays ^3.0.0.

== [3.5.41](vuejs/core@v3.5.40...v3.5.41) (2026-08-05)

== Bug Fixes

* **compiler-core:** preserve vnode lifecycle in stable v-for ([#11682](vuejs/core#11682)) ([02421cd](vuejs/core@02421cd)), closes [#9239](vuejs/core#9239) [#12569](vuejs/core#12569)
* **compiler-sfc:** handle transformed template AST after cache invalidation ([#15136](vuejs/core#15136)) ([a4440c0](vuejs/core@a4440c0)), closes [#15126](vuejs/core#15126) [#15128](vuejs/core#15128)
* **custom-element:** preserve nested async mount order ([#15154](vuejs/core#15154)) ([71f9ff5](vuejs/core@71f9ff5)), closes [#15153](vuejs/core#15153)
* **custom-element:** warn when props override native properties ([#12125](vuejs/core#12125)) ([22b53ea](vuejs/core@22b53ea)), closes [#12124](vuejs/core#12124)
* **runtime-core:** avoid re-fetching resource props with unchanged values ([#15105](vuejs/core#15105)) ([a7513a1](vuejs/core@a7513a1))
* **runtime-core:** restore SSR setup state when handling async setup result ([#15114](vuejs/core#15114)) ([b6191cb](vuejs/core@b6191cb)), closes [#15113](vuejs/core#15113)
* **scheduler:** avoid stack overflow when flushing very large post cb arrays ([#15143](vuejs/core#15143)) ([c04a45d](vuejs/core@c04a45d)), closes [#15142](vuejs/core#15142)
* **slots:** handle nullish v-bind slot props ([#15177](vuejs/core#15177)) ([2506700](vuejs/core@2506700))
* **ssr:** normalize hidden states during hydration ([#13125](vuejs/core#13125)) ([4e467d7](vuejs/core@4e467d7))
* **transition:** support transition to teleport component child ([#11959](vuejs/core#11959)) ([77061fe](vuejs/core@77061fe)), closes [#11910](vuejs/core#11910)
* **types:** preserve defineModel inference with factory defaults ([#15097](vuejs/core#15097)) ([0516c43](vuejs/core@0516c43)), closes [#15096](vuejs/core#15096)
* **v-model:** preserve text input before hydration ([#14411](vuejs/core#14411)) ([2468464](vuejs/core@2468464)), closes [#14403](vuejs/core#14403)

== [3.5.40](vuejs/core@v3.5.39...v3.5.40) (2026-07-16)

== Bug Fixes

* **compiler-core:** avoid leaking slot branch keys ([#15051](vuejs/core#15051)) ([20c9d26](vuejs/core@20c9d26)), closes [#15048](vuejs/core#15048)
* **hydration:** pass namespace when patching dynamic props ([#15082](vuejs/core#15082)) ([e0d2723](vuejs/core@e0d2723)), closes [#15081](vuejs/core#15081) [#15050](vuejs/core#15050)
* **reactivity:** handle effect removal during scope stop ([#15084](vuejs/core#15084)) ([378f978](vuejs/core@378f978)), closes [#15083](vuejs/core#15083)
* **runtime-core:** skip lazy hydration for detached roots ([#15092](vuejs/core#15092)) ([97f3525](vuejs/core@97f3525)), closes [#15091](vuejs/core#15091)
* **runtime-core:** unwind dangling blocks when slot content throws ([#15071](vuejs/core#15071)) ([ddc132d](vuejs/core@ddc132d)), closes [#15070](vuejs/core#15070)
* **runtime-dom:** respect current select model type ([#15010](vuejs/core#15010)) ([eb89e93](vuejs/core@eb89e93)), closes [#15009](vuejs/core#15009)
* **server-renderer:** handle errors in optimized component renders ([#12601](vuejs/core#12601)) ([474907c](vuejs/core@474907c)), closes [#12575](vuejs/core#12575)
* **server-renderer:** remove package dependency cycle ([#15063](vuejs/core#15063)) ([4d35eca](vuejs/core@4d35eca))
* **shared:** prevent SSR comment escaping from creating closing delimiters ([#15045](vuejs/core#15045)) ([bd962bb](vuejs/core@bd962bb))
* **types:** don't constrain component $el type to Element ([#15040](vuejs/core#15040)) ([164460a](vuejs/core@164460a))

== [3.5.39](vuejs/core@v3.5.38...v3.5.39) (2026-06-25)


== Bug Fixes

* **compiler-core:** correct filter rewrite recursion ([#14959](vuejs/core#14959)) ([be7ce31](vuejs/core@be7ce31))
* **hydration:** force patch dynamic props when hydrating ([#9083](vuejs/core#9083)) ([024cf06](vuejs/core@024cf06)), closes [#9033](vuejs/core#9033)
* **hydration:** respect data-allow-mismatch on conditional branches ([#12801](vuejs/core#12801)) ([164af63](vuejs/core@164af63)), closes [#12782](vuejs/core#12782)
* **reactivity:** avoid triggering effects when set fails ([#14964](vuejs/core#14964)) ([e450973](vuejs/core@e450973))
* **runtime-core:** handle non-isomorphic block element update ([#15002](vuejs/core#15002)) ([932ddd0](vuejs/core@932ddd0)), closes [#6385](vuejs/core#6385)
* **runtime-core:** normalize function children for elements and Teleport ([#9108](vuejs/core#9108)) ([2f374cd](vuejs/core@2f374cd)), closes [#9107](vuejs/core#9107)
* **runtime-core:** pause tracking when invoking function refs ([#14985](vuejs/core#14985)) ([3ac052b](vuejs/core@3ac052b))
* **runtime-core:** preserve once event listener name ([#8341](vuejs/core#8341)) ([87b73b6](vuejs/core@87b73b6)), closes [#8342](vuejs/core#8342)
* **runtime-dom:** preserve option modifier event names ([#8338](vuejs/core#8338)) ([4b659e6](vuejs/core@4b659e6)), closes [#8334](vuejs/core#8334)
* **ssr:** dedupe inherited scope ids during vnode rendering ([#15005](vuejs/core#15005)) ([027da6b](vuejs/core@027da6b)), closes [#12159](vuejs/core#12159) [#12175](vuejs/core#12175)
* **ssr:** resolve nested async teleport content ([#9431](vuejs/core#9431)) ([31d0f23](vuejs/core@31d0f23)), closes [#6207](vuejs/core#6207)
* **teleport:** handle teleport unmount edge case ([#12705](vuejs/core#12705)) ([671997a](vuejs/core@671997a)), closes [#12702](vuejs/core#12702)
* **types:** support named tuple emits ([#12676](vuejs/core#12676)) ([232f402](vuejs/core@232f402)), closes [#12673](vuejs/core#12673)
* **types:** validate defineModel defaults ([#14968](vuejs/core#14968)) ([747f57e](vuejs/core@747f57e)), closes [#14966](vuejs/core#14966)

== [3.5.38](vuejs/core@v3.5.37...v3.5.38) (2026-06-11)

== [3.5.37](vuejs/core@v3.5.36...v3.5.37) (2026-06-11)

== [3.5.36](vuejs/core@v3.5.35...v3.5.36) (2026-06-11)


== Bug Fixes

* **compiler-core:** avoid crash on CDATA at the document root ([#14916](vuejs/core#14916)) ([0ea17e2](vuejs/core@0ea17e2))
* **compiler-core:** prefix dynamic keys on v-memo elements ([#14922](vuejs/core#14922)) ([68e978e](vuejs/core@68e978e)), closes [#14920](vuejs/core#14920)
* **compiler-sfc:** handle vue-ignore on leading intersection/union type ([#14950](vuejs/core#14950)) ([0dcd225](vuejs/core@0dcd225)), closes [#12254](vuejs/core#12254)
* **compiler-sfc:** respect var hoisting in props destructure ([48ad452](vuejs/core@48ad452))
* **reactivity:** preserve watch callback return value when wrapped for `once: true` ([#14902](vuejs/core#14902)) ([450a8a8](vuejs/core@450a8a8))
* **runtime-core:** add dev warning for silent catch in compat mode and fix test description typo ([#14891](vuejs/core#14891)) ([db3e117](vuejs/core@db3e117))
* **runtime-core:** force model update when reverted before sync ([#14897](vuejs/core#14897)) ([7f76378](vuejs/core@7f76378)), closes [#13524](vuejs/core#13524)
* **runtime-core:** skip async component callbacks after unmount ([#14911](vuejs/core#14911)) ([5300ead](vuejs/core@5300ead))
* **transition:** avoid move transition for hidden v-show group children ([#14895](vuejs/core#14895)) ([c11f6ee](vuejs/core@c11f6ee)), closes [#14894](vuejs/core#14894)
* **watch:** trigger immediate callback for empty sources ([#14914](vuejs/core#14914)) ([1f2ca7e](vuejs/core@1f2ca7e)), closes [#14898](vuejs/core#14898)

== [3.5.35](vuejs/core@v3.5.34...v3.5.35) (2026-05-27)


== Bug Fixes

* **compiler-core:** avoid double processing v-for keys with v-memo ([#14861](vuejs/core#14861)) ([34a0ded](vuejs/core@34a0ded)), closes [#14859](vuejs/core#14859)
* **compiler-sfc:** resolve top-level exports from files registered as global types ([#14805](vuejs/core#14805)) ([3d077f2](vuejs/core@3d077f2)), closes [nuxt/nuxt#33694](nuxt/nuxt#33694)
* **runtime-core:** avoid repeated hydration mismatch checks ([#14857](vuejs/core#14857)) ([170fc95](vuejs/core@170fc95)), closes [#14855](vuejs/core#14855)
* **runtime-core:** skip idle persisted transition hooks in keep-alive moves ([#14865](vuejs/core#14865)) ([80fc139](vuejs/core@80fc139)), closes [#14031](vuejs/core#14031)
* **server-renderer:** propagate sync errors from `ssrRenderSuspense` ([#14804](vuejs/core#14804)) ([4760997](vuejs/core@4760997)), closes [nuxt/nuxt#28162](nuxt/nuxt#28162)
* **teleport:** skip child unmount when pending mount discarded ([#14876](vuejs/core#14876)) ([#14877](vuejs/core#14877)) ([584beb1](vuejs/core@584beb1))


== Performance Improvements

* **reactivity:** skip type checks for cached proxies ([#14860](vuejs/core#14860)) ([5734fe9](vuejs/core@5734fe9))
* **runtime-dom:** optimize array event handler dispatch ([#14828](vuejs/core#14828)) ([bb18dc8](vuejs/core@bb18dc8))
* **server-renderer:** avoid materializing iterables in ssrRenderList ([#14821](vuejs/core#14821)) ([1b7a2cc](vuejs/core@1b7a2cc))

== [3.5.34](vuejs/core@v3.5.33...v3.5.34) (2026-05-06)


== Bug Fixes

* **compiler-sfc:** infer Vue ref wrapper types when source is unresolvable ([#14758](vuejs/core#14758)) ([7f46fd4](vuejs/core@7f46fd4)), closes [#14729](vuejs/core#14729)
* **compiler-sfc:** preserve hash hrefs on `<image>` elements ([#14756](vuejs/core#14756)) ([090b2e3](vuejs/core@090b2e3))
* **compiler-sfc:** resolve type re-exports inside declare global ([#14766](vuejs/core#14766)) ([acfffe3](vuejs/core@acfffe3))
* **reactivity:** prevent orphan effect when created in a stopped scope ([#14778](vuejs/core#14778)) ([c8e2d4a](vuejs/core@c8e2d4a)), closes [#14777](vuejs/core#14777)
* **runtime-core:** avoid symbol coercion during props validation ([#8539](vuejs/core#8539)) ([23d4fb5](vuejs/core@23d4fb5)), closes [#8487](vuejs/core#8487)
* **suspense:** avoid DOM leak with out-in transition in v-if fragment ([#14762](vuejs/core#14762)) ([9667e0d](vuejs/core@9667e0d)), closes [#14761](vuejs/core#14761)

== [3.5.33](vuejs/core@v3.5.32...v3.5.33) (2026-04-22)


== Bug Fixes

* **compiler-sfc:** handle nested :deep in selector pseudos ([#14725](vuejs/core#14725)) ([bb9d265](vuejs/core@bb9d265)), closes [#14724](vuejs/core#14724)
* **reactivity:** unlink effect scopes on out-of-order off ([#14734](vuejs/core#14734)) ([e7659be](vuejs/core@e7659be)), closes [#14733](vuejs/core#14733)
* **runtime-dom:** preserve textarea resize dimensions ([#14747](vuejs/core#14747)) ([11fb2fd](vuejs/core@11fb2fd)), closes [#14741](vuejs/core#14741)
* **teleport:** don't move teleport children if not mounted ([#14702](vuejs/core#14702)) ([6a61f44](vuejs/core@6a61f44)), closes [#14701](vuejs/core#14701)
* **transition:** preserve placeholder for conditional explicit default slots ([#14748](vuejs/core#14748)) ([45990ce](vuejs/core@45990ce)), closes [#14727](vuejs/core#14727)



== [3.5.32](vuejs/core@v3.5.31...v3.5.32) (2026-04-03)


== Bug Fixes

* **runtime-core:** prevent currentInstance leak into sibling render during async setup re-entry ([#14668](vuejs/core#14668)) ([f166353](vuejs/core@f166353)), closes [#14667](vuejs/core#14667)
* **teleport:** handle updates before deferred mount ([#14642](vuejs/core#14642)) ([32b44f1](vuejs/core@32b44f1)), closes [#14640](vuejs/core#14640)
* **types:** allow customRef to have different getter/setter types ([#14639](vuejs/core#14639)) ([e20ddb0](vuejs/core@e20ddb0))
* **types:** use private branding for shallowReactive ([#14641](vuejs/core#14641)) ([302c47a](vuejs/core@302c47a)), closes [#14638](vuejs/core#14638) [#14493](vuejs/core#14493)


== Reverts

* Revert "fix(server-renderer): cleanup component effect scopes after SSR render" (#14674) ([219d83b](vuejs/core@219d83b)), closes [#14674](vuejs/core#14674) [#14669](vuejs/core#14669)



== [3.5.31](vuejs/core@v3.5.30...v3.5.31) (2026-03-25)


== Bug Fixes

* **compiler-sfc:** allow Node.js subpath imports patterns in asset urls ([#13045](vuejs/core#13045)) ([95c3356](vuejs/core@95c3356)), closes [#9919](vuejs/core#9919)
* **compiler-sfc:** support template literal as defineModel name ([#14622](vuejs/core#14622)) ([bd7eef0](vuejs/core@bd7eef0)), closes [#14621](vuejs/core#14621)
* **reactivity:** normalize toRef property keys before dep lookup + improve types ([#14625](vuejs/core#14625)) ([1bb28d0](vuejs/core@1bb28d0)), closes [#12427](vuejs/core#12427) [#12431](vuejs/core#12431)
* **runtime-core:** invalidate detached v-for memo vnodes after unmount ([#14624](vuejs/core#14624)) ([560def4](vuejs/core@560def4)), closes [#12708](vuejs/core#12708) [#12710](vuejs/core#12710)
* **runtime-core:** preserve nullish event handlers in mergeProps ([#14550](vuejs/core#14550)) ([5725222](vuejs/core@5725222))
* **runtime-core:** prevent merging model listener when value is null or undefined ([#14629](vuejs/core#14629)) ([b39e032](vuejs/core@b39e032))
* **runtime-dom:** defer teleport mount/update until suspense resolves ([#8619](vuejs/core#8619)) ([88ed045](vuejs/core@88ed045)), closes [#8603](vuejs/core#8603)
* **runtime-dom:** handle activeElement check in Shadow DOM for v-model ([#14196](vuejs/core#14196)) ([959ded2](vuejs/core@959ded2))
* **server-renderer:** cleanup component effect scopes after SSR render ([#14548](vuejs/core#14548)) ([862f11e](vuejs/core@862f11e))
* **suspense:** avoid unmount activeBranch twice if wrapped in transition ([#9392](vuejs/core#9392)) ([908c6ad](vuejs/core@908c6ad)), closes [#7966](vuejs/core#7966)
* **suspense:** update suspense vnode's el during branch self-update ([#12922](vuejs/core#12922)) ([a2c1700](vuejs/core@a2c1700)), closes [#12920](vuejs/core#12920)
* **transition:** skip enter guard while hmr updating ([#14611](vuejs/core#14611)) ([be0a2f1](vuejs/core@be0a2f1)), closes [#14608](vuejs/core#14608)
* **types:** prevent shallowReactive marker from leaking into value unions ([#14493](vuejs/core#14493)) ([3b561db](vuejs/core@3b561db)), closes [#14490](vuejs/core#14490)



== [3.5.30](vuejs/core@v3.5.29...v3.5.30) (2026-03-09)


== Bug Fixes

* **compat:** add `entities` to @vue/compat deps to fix CJS edge cases ([#12514](vuejs/core#12514)) ([e725a67](vuejs/core@e725a67)), closes [#10609](vuejs/core#10609)
* **custom-element:** ensure child component styles are injected in correct order before parent styles ([#13374](vuejs/core#13374)) ([1398bf8](vuejs/core@1398bf8)), closes [#13029](vuejs/core#13029)
* **custom-element:** properly locate parent when slotted in shadow dom ([#12480](vuejs/core#12480)) ([f06c81a](vuejs/core@f06c81a)), closes [#12479](vuejs/core#12479)
* **custom-element:** should properly patch as props for vue custom elements ([#12409](vuejs/core#12409)) ([740983e](vuejs/core@740983e)), closes [#12408](vuejs/core#12408)
* **reactivity:** avoid duplicate raw/proxy entries in Set.add ([#14545](vuejs/core#14545)) ([d943612](vuejs/core@d943612))
* **reactivity:** fix reduce on reactive arrays to preserve reactivity ([#12737](vuejs/core#12737)) ([16ef165](vuejs/core@16ef165)), closes [#12735](vuejs/core#12735)
* **reactivity:** handle `Set` with initial reactive values edge case ([#12393](vuejs/core#12393)) ([5dc27ca](vuejs/core@5dc27ca)), closes [#8647](vuejs/core#8647)
* **runtime-core:** warn about negative number in v-for ([#12308](vuejs/core#12308)) ([9438cc5](vuejs/core@9438cc5))
* **ssr:** prevent watch from firing after async setup await ([#14547](vuejs/core#14547)) ([6cda71d](vuejs/core@6cda71d)), closes [#14546](vuejs/core#14546)
* **types:** make generics with runtime props in defineComponent work (fix [#11374](vuejs/core#11374)) ([#13119](vuejs/core#13119)) ([cea3cf7](vuejs/core@cea3cf7)), closes [#13763](vuejs/core#13763)
* **types:** narrow useAttrs class/style typing for TSX ([#14492](vuejs/core#14492)) ([bbb8977](vuejs/core@bbb8977)), closes [#14489](vuejs/core#14489)



== [3.5.29](vuejs/core@v3.5.28...v3.5.29) (2026-02-24)


== Bug Fixes

* **runtime-core:** prevent instance leak in withAsyncContext ([#14445](vuejs/core#14445)) ([702284f](vuejs/core@702284f)), closes [nuxt/nuxt#33644](nuxt/nuxt#33644)
* **server-renderer:** render className as escaped string ([#14469](vuejs/core#14469)) ([da6690c](vuejs/core@da6690c))
* **transition:** prevent enter if leave is in progress ([#14443](vuejs/core#14443)) ([df059f8](vuejs/core@df059f8)), closes [#12091](vuejs/core#12091) [#12133](vuejs/core#12133)



== [3.5.28](vuejs/core@v3.5.27...v3.5.28) (2026-02-09)


== Bug Fixes

* **transition:** avoid unexpected `cancelled` parameter in transition `done` callback ([#14391](vuejs/core#14391)) ([6798853](vuejs/core@6798853))
* **compiler-sfc:** add resolution trying for `.mts/.cts` files ([#14402](vuejs/core#14402)) ([c09d41f](vuejs/core@c09d41f)), closes [vuejs/router#2611](vuejs/router#2611)
* **compiler-sfc:** no params were generated when using withDefaults ([#12823](vuejs/core#12823)) ([b0a1f05](vuejs/core@b0a1f05)), closes [#12822](vuejs/core#12822)
* **reactivity:** add `__v_skip` flag to `EffectScope` to prevent reactive conversion ([#14359](vuejs/core#14359)) ([48b7552](vuejs/core@48b7552)), closes [#14357](vuejs/core#14357)
* **runtime-core:** avoid retaining el on cached text vnodes during static traversal ([#14419](vuejs/core#14419)) ([4ace79a](vuejs/core@4ace79a)), closes [#14134](vuejs/core#14134)
* **runtime-core:** prevent child component updates when style remains unchanged ([#12825](vuejs/core#12825)) ([57866b5](vuejs/core@57866b5)), closes [#12826](vuejs/core#12826)
* **runtime-core:** properly handle async component update before resolve ([#11619](vuejs/core#11619)) ([e71c26c](vuejs/core@e71c26c)), closes [#11617](vuejs/core#11617)
* **runtime-dom:** handle null/undefined handler in withModifiers ([#14362](vuejs/core#14362)) ([261de54](vuejs/core@261de54)), closes [#14361](vuejs/core#14361)
* **teleport:** properly handling disabled teleport target anchor ([#14417](vuejs/core#14417)) ([d7bcd85](vuejs/core@d7bcd85)), closes [#14412](vuejs/core#14412)
* **transition-group:** correct move translation under scale via element rect ([#14360](vuejs/core#14360)) ([0243a79](vuejs/core@0243a79)), closes [#14356](vuejs/core#14356)
* **useTemplateRef:** don't update setup ref for useTemplateRef key ([#12756](vuejs/core#12756)) ([fc40ca0](vuejs/core@fc40ca0)), closes [#12749](vuejs/core#12749)



== [3.5.27](vuejs/core@v3.5.26...v3.5.27) (2026-01-19)


== Bug Fixes

* **compile-sfc:** correctly handle variable shadowing in for loop for `defineProps` destructuring. ([#14296](vuejs/core#14296)) ([6a1bb50](vuejs/core@6a1bb50)), closes [#14294](vuejs/core#14294)
* **compiler-sfc:** handle indexed access types in declare global blocks ([#14260](vuejs/core#14260)) ([e4091fe](vuejs/core@e4091fe)), closes [#14236](vuejs/core#14236)
* **compiler-sfc:** use correct scope when resolving indexed access types from external files ([#14297](vuejs/core#14297)) ([f0f0a21](vuejs/core@f0f0a21)), closes [#14292](vuejs/core#14292)
* **reactivity:** collection iteration should inherit iterator instance methods ([#12644](vuejs/core#12644)) ([3c8b2fc](vuejs/core@3c8b2fc)), closes [#12615](vuejs/core#12615)
* **runtime-core:** skip patching reserved props for custom elements ([#14275](vuejs/core#14275)) ([19cc7e2](vuejs/core@19cc7e2)), closes [#14274](vuejs/core#14274)
* **server-renderer:** use ssrRenderClass helper for className attribute ([#14327](vuejs/core#14327)) ([a4708f3](vuejs/core@a4708f3))
* **ssr:** handle v-bind modifiers during render attrs ([#14263](vuejs/core#14263)) ([c2f5964](vuejs/core@c2f5964)), closes [#14262](vuejs/core#14262)



== [3.5.26](vuejs/core@v3.5.25...v3.5.26) (2025-12-18)


== Bug Fixes

* **compat:** fix compat handler of draggable ([#12445](vuejs/core#12445)) ([ed85953](vuejs/core@ed85953)), closes [#12444](vuejs/core#12444)
* **compat:** handle v-model deprecation warning with missing appContext ([#14203](vuejs/core#14203)) ([945a543](vuejs/core@945a543)), closes [#14202](vuejs/core#14202)
* **compiler-sfc:** demote const reactive bindings used in v-model ([#14214](vuejs/core#14214)) ([e24ff7d](vuejs/core@e24ff7d)), closes [#11265](vuejs/core#11265) [#11275](vuejs/core#11275)
* **compiler-ssr:** handle ssr attr fallthrough when preserve whitespace ([#12304](vuejs/core#12304)) ([4783118](vuejs/core@4783118)), closes [#8072](vuejs/core#8072)
* **hmr:** handle cached text node update ([#14134](vuejs/core#14134)) ([69ce3c7](vuejs/core@69ce3c7)), closes [#14127](vuejs/core#14127)
* **keep-alive:** use resolved component name for async components in cache pruning ([#14212](vuejs/core#14212)) ([dfe667c](vuejs/core@dfe667c)), closes [#14210](vuejs/core#14210)
* **runtime-core:** ensure correct anchor el for deeper unresolved async components ([#14182](vuejs/core#14182)) ([f5b3bf2](vuejs/core@f5b3bf2)), closes [#14173](vuejs/core#14173)
* **runtime-core:** handle patch stable fragment edge case ([#12411](vuejs/core#12411)) ([94aeb64](vuejs/core@94aeb64)), closes [#12410](vuejs/core#12410)
* **runtime-core:** pass component instance to flushPreFlushCbs on unmount ([#14221](vuejs/core#14221)) ([e857e12](vuejs/core@e857e12)), closes [#14215](vuejs/core#14215)


== Performance Improvements

* **compiler-core:** use binary-search to get line and column ([#14222](vuejs/core#14222)) ([1904053](vuejs/core@1904053))



== [3.5.25](vuejs/core@v3.5.24...v3.5.25) (2025-11-24)


== Bug Fixes

* **compiler:** share logic for comments and whitespace ([#13550](vuejs/core#13550)) ([2214f7a](vuejs/core@2214f7a))
* **provide:** warn when using `provide` after mounting ([#13954](vuejs/core#13954)) ([247b2c2](vuejs/core@247b2c2)), closes [#13921](vuejs/core#13921) [#13924](vuejs/core#13924)
* **reactivity:** correctly wrap iterated array items to preserve their readonly status ([#14120](vuejs/core#14120)) ([301020b](vuejs/core@301020b))
* **reactivity:** toRef edge cases for ref unwrapping ([#12420](vuejs/core#12420)) ([0d2357e](vuejs/core@0d2357e))
* **runtime-core:** keep options API typing intact when expose is used ([#14118](vuejs/core#14118)) ([8f82f23](vuejs/core@8f82f23)), closes [#14117](vuejs/core#14117) [vuejs/language-tools#5069](vuejs/language-tools#5069)
* **suspense:** defer clearing fallback vnode el in case it has dirs ([#14080](vuejs/core#14080)) ([c0f63dd](vuejs/core@c0f63dd)), closes [#14078](vuejs/core#14078)



== [3.5.24](vuejs/core@v3.5.23...v3.5.24) (2025-11-07)


== Reverts

* Revert "fix(compiler-core): correctly handle ts type assertions in expression…" (#14062) ([11ec51a](vuejs/core@11ec51a)), closes [#14062](vuejs/core#14062) [#14060](vuejs/core#14060)



== [3.5.23](vuejs/core@v3.5.22...v3.5.23) (2025-11-06)


== Bug Fixes

* **compiler-core:** correctly handle ts type assertions in expressions ([#13397](vuejs/core#13397)) ([e6544ac](vuejs/core@e6544ac)), closes [#13395](vuejs/core#13395)
* **compiler-core:** fix v-bind shorthand handling for in-DOM templates ([#13933](vuejs/core#13933)) ([b3cca26](vuejs/core@b3cca26)), closes [#13930](vuejs/core#13930)
* **compiler-sfc:** resolve numeric literals and template literals without expressions as static property key ([#13998](vuejs/core#13998)) ([75d44c7](vuejs/core@75d44c7))
* **compiler-ssr:** textarea with v-text directive SSR ([#13975](https://github.com/vuejs/core/issues/13975)) ([006a0c1](vuejs/core@006a0c1))
* **compiler:** using guard instead of non-nullish assertion ([#13982](https://github.com/vuejs/core/issues/13982)) ([dcc6f36](vuejs/core@dcc6f36))
* **custom-element:** batch custom element prop patching ([#13478](https://github.com/vuejs/core/issues/13478)) ([c13e674](vuejs/core@c13e674)), closes [#12619](https://github.com/vuejs/core/issues/12619)
* **custom-element:** optimize slot retrieval to avoid duplicates ([#13961](https://github.com/vuejs/core/issues/13961)) ([84ca349](vuejs/core@84ca349)), closes [#13955](https://github.com/vuejs/core/issues/13955)
* **hydration:** avoid mismatch during hydrate text with newlines in interpolation ([#9232](https://github.com/vuejs/core/issues/9232)) ([6cbdf78](vuejs/core@6cbdf78)), closes [#9229](https://github.com/vuejs/core/issues/9229)
* **runtime-core:** pass props and children to loadingComponent ([#13997](https://github.com/vuejs/core/issues/13997)) ([40c4b2a](vuejs/core@40c4b2a))
* **runtime-dom:** ensure iframe sandbox is handled as an attribute to prevent unintended behavior ([#13950](https://github.com/vuejs/core/issues/13950)) ([5689884](vuejs/core@5689884)), closes [#13946](https://github.com/vuejs/core/issues/13946)
* **suspense:** clear placeholder and fallback el after resolve to enable GC ([#13928](https://github.com/vuejs/core/issues/13928)) ([f411c66](vuejs/core@f411c66))
* **transition-group:** use offsetLeft and offsetTop instead of getBoundingClientRect  to avoid transform scale affect animation ([#6108](https://github.com/vuejs/core/issues/6108)) ([dc4dd59](vuejs/core@dc4dd59)), closes [#6105](https://github.com/vuejs/core/issues/6105)
* **v-model:** handle number modifier on change ([#13959](https://github.com/vuejs/core/issues/13959)) ([8fbe48f](vuejs/core@8fbe48f)), closes [#13958](https://github.com/vuejs/core/issues/13958)




Release notes: https://github.com/vuejs/core/blob/main/CHANGELOG.md
@GrantGryczan

GrantGryczan commented Oct 6, 2026 •

Copy link
Copy Markdown

This fix doesn't work when v-model is a fallthrough attribute through one component to another component that actually defines the model.

I'll create a more detailed issue for this later (if someone else doesn't first).

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

Labels

🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. scope:hydration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve input values entered during hydration

4 participants