Skip to content

mat-select should close when escape is pressed, also stop propagation #7981

Closed
@alex-okrushko

Description

@alex-okrushko

Bug, feature request, or proposal:

bug?

What is the expected behavior?

when mat-select is open and escape is pressed it should close the select

What is the current behavior?

select doesn't close and the element upstream gets the escape. In my case the mat-drawer catches this Escape which results in weird behavior: drawer closes, and the opened select is floating outside of it (because it's part of the cdk-portal).

What are the steps to reproduce?

http://plnkr.co/edit/vtBv4N8p0o4hzFetaOGx?p=preview

Open drawer
Click the selector
Press ESC

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions