fix(runtime-dom): ensure readonly type prop on textarea is handled patched as attribute (#2888)

close #2766

Co-authored-by: Thorsten Luenborg <t.luneborg@googlemail.com>
This commit is contained in:
Thorsten Lünborg
2021-02-24 20:51:19 +01:00
committed by GitHub
parent 4117def226
commit c5d147c57f
2 changed files with 12 additions and 0 deletions

View File

@@ -115,5 +115,10 @@ function shouldSetAsProp(
return false
}
// DOMprop "type" is readonly on textarea elements: https://github.com/vuejs/vue-next/issues/2766
if (key === 'type' && el.tagName === 'TEXTAREA') {
return false
}
return key in el
}