components icon indicating copy to clipboard operation
components copied to clipboard

matTextareaAutosize gets focus on initialization

Open palpatine1991 opened this issue 8 years ago • 4 comments

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

palpatine1991 avatar May 22 '18 14:05 palpatine1991

I also have this bug. Tested on Edge

MichaelFlyacts avatar May 22 '18 16:05 MichaelFlyacts

Probably a duplicate of https://github.com/angular/material2/issues/11308 However the affected user base seems to be bigger as initially described, if this is not only iOS.

pfeigl avatar May 22 '18 19:05 pfeigl

Hi @mmalerba / @crisbeto ,

I recently updated my angular material and still facing this issue. I'm using "@angular/material": "^6.4.2" and was wondering if the fix for this issue is part of this version. If yes, kindly let me know if updating to the material will resolve the issue or do I have to update more dependencies.

Thank you Dharmesh P

webUIdevelopment avatar Aug 01 '18 23:08 webUIdevelopment

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.