diff --git a/packages/runtime-dom/src/modules/attrs.ts b/packages/runtime-dom/src/modules/attrs.ts
index ff3ce36bf52..8d8c10c31bf 100644
--- a/packages/runtime-dom/src/modules/attrs.ts
+++ b/packages/runtime-dom/src/modules/attrs.ts
@@ -18,6 +18,7 @@ export function patchAttr(
value: any,
isSVG: boolean,
instance?: ComponentInternalInstance | null,
+ isBoolean = isSpecialBooleanAttr(key),
) {
if (isSVG && key.startsWith('xlink:')) {
if (value == null) {
@@ -32,7 +33,6 @@ export function patchAttr(
// note we are only checking boolean attributes that don't have a
// corresponding dom prop of the same name here.
- const isBoolean = isSpecialBooleanAttr(key)
if (value == null || (isBoolean && !includeBooleanAttr(value))) {
el.removeAttribute(key)
} else {
diff --git a/packages/runtime-dom/src/patchProp.ts b/packages/runtime-dom/src/patchProp.ts
index ef0197ed23c..0da0ff1f272 100644
--- a/packages/runtime-dom/src/patchProp.ts
+++ b/packages/runtime-dom/src/patchProp.ts
@@ -52,6 +52,11 @@ export const patchProp: DOMRendererOptions['patchProp'] = (
parentSuspense,
unmountChildren,
)
+ // #6007 also set form state as attributes so they work with
+ // or libs / extensions that expect attributes
+ if (key === 'value' || key === 'checked' || key === 'selected') {
+ patchAttr(el, key, nextValue, isSVG, parentComponent, key !== 'value')
+ }
} else {
// special case for with
// :true-value & :false-value