You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MatInputHarness.getName() fails with MatInput and ngModel #18624
I looked into it quickly and I managed to reproduce it. It looks like the issue is that when ngModel is set, the native DOM name property isn't being set on the input element.
@crisbeto if we inspect the element using dev tools it looks like the name property is set correctly to the test value. Or is this the attribute that I see over there?
@crisbeto you are right! I inspected the second input of my example that does not have ngModel, sorry about that. So, what do you think? Is this a bug with ngModel?
Activity
crisbeto commentedon Feb 26, 2020
I looked into it quickly and I managed to reproduce it. It looks like the issue is that when
ngModelis set, the native DOMnameproperty isn't being set on theinputelement.bampakoa commentedon Mar 6, 2020
@crisbeto if we inspect the element using dev tools it looks like the
nameproperty is set correctly to thetestvalue. Or is this the attribute that I see over there?crisbeto commentedon Mar 6, 2020
Here's what I'm trying. In my case the
inputdoesn't have anameattribute ornameproperty. https://stackblitz.com/edit/angular-gfc66vbampakoa commentedon Mar 6, 2020
@crisbeto you are right! I inspected the second input of my example that does not have
ngModel, sorry about that. So, what do you think? Is this a bug withngModel?fix(input/testing): inconsistently reading name from input with ngModel
fix(input/testing): inconsistently reading name from input with ngModel
fix(input/testing): inconsistently reading name from input with ngModel
fix(material/input): inconsistently reading name from input with ngModel
fix(material/input): inconsistently reading name from input with ngModel
fix(material/input): inconsistently reading name from input with ngModel
fix(material/input): inconsistently reading name from input with ngModel
fix(material/input): inconsistently reading name from input with ngModel
fix(material/input): inconsistently reading name from input with ngMo…
fix(material/input): inconsistently reading name from input with ngMo…
angular-automatic-lock-bot commentedon Feb 14, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(material/input): inconsistently reading name from input with ngMo…