value: any,
isSVG: boolean,
instance?: ComponentInternalInstance | null,
+ isBoolean = isSpecialBooleanAttr(key),
) {
if (isSVG && key.startsWith('xlink:')) {
if (value == null) {
// 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 {
parentSuspense,
unmountChildren,
)
+ // #6007 also set form state as attributes so they work with
+ // <input type="reset"> 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 <input v-model type="checkbox"> with
// :true-value & :false-value