Repository navigation
fix(runtime-vapor): align DOM prop updates with VDOM - #15343
Conversation
Compare DOM prop updates against the previous raw binding value instead of the browser-normalized live property. This ensures changed bindings are written even when the DOM property already normalizes to the same value, while preserving initial writes and same-binding skips. Add regressions for reflected string and numeric properties.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthrough
ChangesDOM property binding
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized runtime behavior fix is merge-ready after normal checks and review, with no actionable merge-blocking risk remaining. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
Every entry in the release is a `runtime-vapor` fix, an hmr or scheduler fix, or a `runtime-vapor` perf change — nothing breaking since rc.2 made event delegation opt-in. The exports map is byte-identical to rc.5, so the packaging conclusions still hold. Three of the fixes reach the markup, and all three move vapor towards vdom rather than away. Vapor no longer skips the initial DOM prop write, and compares against the previous binding rather than the live property (vuejs/core#15341, vuejs/core#15343) — so `type`, which reflects, now lands as `type="text"` exactly as vdom has always written it. And `setValue` writes the `value` attribute, giving a form reset something to restore from (vuejs/core#15340). Four tests asserted what those quirks left out, each with a comment explaining the vapor detour. The behaviour they documented is the one that got fixed, so they now read the attribute instead of asserting it away, and the comments go with it. The textarea keeps its own assertion through `expectResetSource`: the attribute vapor writes there is inert markup, and the children are still the only reset source. 5827 ropav tests and 589 storybook tests green. Two workarounds were re-measured against the release rather than assumed, and both stay. The fallthrough `onUpdate:X` regression rc.5 introduced is still here — dropping the explicit forward from the calendar fixture fails the same two selection tests it failed on rc.5. And the `<input>` half of `setFormValue` is now duplicated by the runtime: removing its `defaultValue` write leaves every input and form test green, with only the textarea failing. It earns its place on the other three counts — a textarea keeps its reset source in its children, `setFormChecked` has no counterpart upstream at all, and neither does the guarantee that the attribute survives a key leaving a vapor bag.
Compare DOM prop updates against the previous raw binding value instead of the browser-normalized live property.
This ensures changed bindings are written even when the DOM property already normalizes to the same value, while preserving initial writes and same-binding skips. Add regressions for reflected string and numeric properties.
Summary by CodeRabbit
0are correctly written to DOM attributes.