Skip to content

Commit

Permalink
fix(form-field): error when focusing outline form field angular eleme…
Browse files Browse the repository at this point in the history
…nts on IE/Edge (#18062)

Fixes an error that was being thrown by IE and Edge when focusing an outline form field, because we were using `item` to access the items inside a `querySelectorAll` result. It seems like `item` isn't available when we're inside a polyfilled web component.

Fixes #16095.
  • Loading branch information
crisbeto authored and mmalerba committed Jan 7, 2020
1 parent 86a4ba7 commit f573072
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/material/form-field/form-field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,10 @@ export class MatFormField extends _MatFormFieldMixinBase
}

for (let i = 0; i < startEls.length; i++) {
startEls.item(i).style.width = `${startWidth}px`;
startEls[i].style.width = `${startWidth}px`;
}
for (let i = 0; i < gapEls.length; i++) {
gapEls.item(i).style.width = `${gapWidth}px`;
gapEls[i].style.width = `${gapWidth}px`;
}

this._outlineGapCalculationNeededOnStable =
Expand Down

0 comments on commit f573072

Please sign in to comment.