Skip to content

Commit

Permalink
moveup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhmushan committed Feb 28, 2022
1 parent ab7752f commit 089b4c7
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions packages/runtime-dom/src/patchProp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ function shouldSetAsProp(
return false
}

// spellcheck and draggable are numerated attrs, however their
// corresponding DOM properties are actually booleans - this leads to
// setting it with a string "false" value leading it to be coerced to
// `true`, so we need to always treat them as attributes.
// these are enumerated attrs, however their corresponding DOM properties
// are actually booleans - this leads to setting it with a string "false"
// value leading it to be coerced to `true`, so we need to always treat
// them as attributes.
// Note that `contentEditable` doesn't have this problem: its DOM
// property is also enumerated string values.
if (key === 'spellcheck' || key === 'draggable') {
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
return false
}

Expand All @@ -105,12 +105,6 @@ function shouldSetAsProp(
return false
}

// #5462 translate is an enumerated attr, however its
// corresponding DOM property are actually boolean.
if (key === 'translate') {
return false
}

// native onclick with string value, must be set as attribute
if (nativeOnRE.test(key) && isString(value)) {
return false
Expand Down

0 comments on commit 089b4c7

Please sign in to comment.