Unintentional autofocus when using cdkTextareaAutosize
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
Textarea should not autofocus.
What is the current behavior?
Textarea get’s autofocus when using cdkTextareaAutosize.
What are the steps to reproduce?
~~https://stackblitz.com/edit/angular-rtrc1b~~
EDIT Please see https://github.com/angular/material2/issues/11308#issuecomment-389446082
Simple debug in an iOS Simulator or on a real device using Mobile Safari.
Add / Remove the cdkTextareaAutosize
Directive, then reload to reproduce.
What is the use-case or motivation for changing an existing behavior?
Using pristine
is no longer really an option because cdkTextareaAutosize
breaks this for Mobile Safari. While the textarea is gaining autofocus the virtual keyboard does not pop up even thought there’s visual feedback that the textarea is having focus. It’s really a weird user experience and should get fixed.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
- Angular: 6.0.0
- Material: 6.0.1
- OS: iOS 11.3.1
- TypeScript: ? (Stackblitz)
- Browsers: Mobile Safari
Is there anything else we should know?
I’ve attached screenshots of the expected behavior and the actual behavior.
Expected Behavior | Actual Behavior |
---|---|
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thanks, just gave it a try and can reproduce with the following simple code:
which is pretty much what is happening internally
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.