-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Dialog close() from <input> event no longer works. #4287
Comments
I did a little bisect of the material2-builds to help narrow it down, and it looks like there were two regressions with using keydown to close the dialog: Regression 1
This slight regression can be attributed to #3774 Regression 2
The only MdDialog commit between this merge range is #3892 and is probably your culprit // cc @crisbeto |
Fixes the dialog restoring focus before the close animation is done. Fixes angular#4287.
It's because Material restores focus immediately, instead of waiting for the animation to finish. I've opened a PR that should fix it (#4329). Meanwhile you can work around it either by closing on |
Fixes the dialog restoring focus before the close animation is done. Fixes #4287.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug:
I have a dialog with an Input. When the user presses ENTER, the dialog closes.
My project is using builds from github.com/angular/material2-builds.git
This was working about 2 weeks ago, but when I last updated it broke.
So commit somewhere between April 17-April 25 caused this problem.
Now, pressing ENTER will briefly close and re-open the dialog over and over.
However, a button
(click)
can close using the API just fine.See: http://plnkr.co/edit/K1TfpHfdPORKb7afApsZ?p=preview
I'm guessing one of these commits caused the issue?
85bc3a6
7428c49
29968b8
What is the expected behavior?
Should be able to call
.close()
in a(onKeyDown)
handler.What is the current behavior?
Dialog closes and then re-opens instead of staying closed.
What are the steps to reproduce?
http://plnkr.co/edit/K1TfpHfdPORKb7afApsZ?p=preview
What is the use-case or motivation for changing an existing behavior?
Users expect simple dialogs to close when they press enter on an Input.
Which versions of Angular, Material, OS, browsers are affected?
Latest master. 607f5a645f31e0db437b0df1192f58e14562f126
The text was updated successfully, but these errors were encountered: