Skip to content

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

Closed

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

Activity

  1. self-assigned this
    on Oct 23, 2017
  2. alex-okrushko commented on Oct 23, 2017

    @alex-okrushko
    ContributorAuthor

    e14626e2-0697-44bc-bae1-8014b157f927

  3. added a commit that references this issue on Oct 26, 2017
    5e0ebad
  4. crisbeto commented on Nov 28, 2017

    @crisbeto
    Member

    Closing as something that will be resolved by #8531.

  5. alex-okrushko commented on Jan 22, 2018

    @alex-okrushko
    ContributorAuthor

    This wasn't fixed
    here is with the latest material and angular 5.2.1 http://plnkr.co/edit/aJTfUQ5O8L6SN0t4fLrm?p=preview

  6. added
    P3
    and removed on Jan 23, 2018
  7. genyklemberg commented on Feb 6, 2018

    @genyklemberg

    this is because of class="cdk-overlay-backdrop" You should change proper z-index

  8. alex-okrushko commented on Oct 30, 2018

    @alex-okrushko
    ContributorAuthor

    Not reproducible any more

  9. stagefright5 commented on Jul 11, 2019

    @stagefright5

    @alex-okrushko , It is still easily reproducible. Please look at this example:
    https://stackblitz.com/edit/angular-awab22?file=app%2Fsidenav-autosize-example.html

  10. angular-automatic-lock-bot commented on Sep 11, 2019

    @angular-automatic-lock-bot

    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.

  11. locked and limited conversation to collaborators on Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions