From f573072b85820de83c5392ccc44261acab92dd6e Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 7 Jan 2020 21:59:29 +0100 Subject: [PATCH] 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. --- src/material/form-field/form-field.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/material/form-field/form-field.ts b/src/material/form-field/form-field.ts index f24ae43a742e..1b289e6f133d 100644 --- a/src/material/form-field/form-field.ts +++ b/src/material/form-field/form-field.ts @@ -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 =