Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md-input doesn't behave correct if initially focused in md-dialog #4864

Closed
Mario-Eis opened this issue May 29, 2017 · 1 comment · Fixed by #4867
Closed

md-input doesn't behave correct if initially focused in md-dialog #4864

Mario-Eis opened this issue May 29, 2017 · 1 comment · Fixed by #4867
Assignees

Comments

@Mario-Eis
Copy link

Bug, feature request, or proposal:

Bug

What is the expected behavior?

2017-05-29 15_55_32-plunker

What is the current behavior?

2017-05-29 15_56_13-plunker

What are the steps to reproduce?

http://plnkr.co/edit/79nFR1?p=preview

What is the use-case or motivation for changing an existing behavior?

Focused md-input should look the same on all occasions

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

4.0.3 / beta6 / at least Firefox & Chrome

Is there anything else we should know?

Placeholder is floating as soon as you type. But there will be no animation. Behaviour looks and feels a bit "out of place".

@crisbeto crisbeto self-assigned this May 29, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue May 29, 2017
* Focuses the first element when the zone stabilizes, instead of when the microtask queue is empty. This avoids issues where the element might be focused before Angular is done doing change detection.
* Only runs the `onStable` callback if the zone is unstable.
* Avoids an extra DOM lookup by combining a couple of selectors.

Fixes angular#4864.
andrewseguin pushed a commit that referenced this issue Jun 5, 2017
* fix(focus-trap): focus initial element when zone stabilizes

* Focuses the first element when the zone stabilizes, instead of when the microtask queue is empty. This avoids issues where the element might be focused before Angular is done doing change detection.
* Only runs the `onStable` callback if the zone is unstable.
* Avoids an extra DOM lookup by combining a couple of selectors.

Fixes #4864.

* chore: switch to for loop
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants