@HostBinding attributes are not respected by MatFormField #14024
Labels
area: material/form-field
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Adding a
readonly
attribute viaHostBinding
tomatInput
host element should putinput
element to the read-only state, the same way asreadonly="true"
does when directly added to an element.What is the current behavior?
HTML5 input element is correctly in readonly state, however,
matFormField
is still triggering focus animationWhat are the steps to reproduce?
https://stackblitz.com/edit/angular-ty6kkd
First input field is what I expect second field should work like as well.
The difference is on the first field I use
readonly="true"
, while on the second I use@HostBinding() readonly = true
.What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: ^7
Material: ^7
TypeScript: ^3
The text was updated successfully, but these errors were encountered: