Skip to content

matTextareaAutosize gets focus on initialization #11451

@palpatine1991

Description

@palpatine1991

Bug, feature request, or proposal:

Textarea with matTextareaAutozize directive gets the focus on initialization.

What is the expected behavior?

It should not get focus if it is not explicitly focused.

What is the current behavior?

It is now focused during initialization. This for example breaks the ng-touched/ng-untouched classes and therefore validation behavior.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-r4nqhk?file=app/input-overview-example.html

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 6.0.2
Angular Material 6.1.0

Is there anything else we should know?

Only reproducible on Safari (both desktop/mobile), Edge, IE11

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions