Skip to content

Dialog close() from <input> event no longer works. #4287

Closed
@arlowhite

Description

@arlowhite

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions