Skip to content

Commit f573072

Browse files
crisbetommalerba
authored andcommitted
fix(form-field): error when focusing outline form field angular elements 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.
1 parent 86a4ba7 commit f573072

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/material/form-field/form-field.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,10 @@ export class MatFormField extends _MatFormFieldMixinBase
568568
}
569569

570570
for (let i = 0; i < startEls.length; i++) {
571-
startEls.item(i).style.width = `${startWidth}px`;
571+
startEls[i].style.width = `${startWidth}px`;
572572
}
573573
for (let i = 0; i < gapEls.length; i++) {
574-
gapEls.item(i).style.width = `${gapWidth}px`;
574+
gapEls[i].style.width = `${gapWidth}px`;
575575
}
576576

577577
this._outlineGapCalculationNeededOnStable =

0 commit comments

Comments
 (0)