diff --git a/src/lib/input/input.ts b/src/lib/input/input.ts index af144ed38a5a..44d03fb01733 100644 --- a/src/lib/input/input.ts +++ b/src/lib/input/input.ts @@ -328,15 +328,9 @@ export class MatInput extends _MatInputMixinBase implements MatFormFieldControl< return validity && validity.badInput; } - /** Determines if the component host is a textarea. If not recognizable it returns false. */ + /** Determines if the component host is a textarea. */ protected _isTextarea() { - let nativeElement = this._elementRef.nativeElement; - - // In Universal, we don't have access to `nodeName`, but the same can be achieved with `name`. - // Note that this shouldn't be necessary once Angular switches to an API that resembles the - // DOM closer. - let nodeName = this._platform.isBrowser ? nativeElement.nodeName : nativeElement.name; - return nodeName ? nodeName.toLowerCase() === 'textarea' : false; + return this._elementRef.nativeElement.nodeName.toLowerCase() === 'textarea'; } /** diff --git a/src/universal-app/kitchen-sink/kitchen-sink.html b/src/universal-app/kitchen-sink/kitchen-sink.html index f230fd39587e..0df5cf724f5f 100644 --- a/src/universal-app/kitchen-sink/kitchen-sink.html +++ b/src/universal-app/kitchen-sink/kitchen-sink.html @@ -112,7 +112,11 @@