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

Opened option list of a mat-select within a mat-dialog only closes after dialog has disappeared #10799

Closed
wartab opened this issue Apr 11, 2018 · 1 comment · Fixed by #10807
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@wartab
Copy link

wartab commented Apr 11, 2018

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When closing the dialog, the option list of the mat-dialog within the dialog should disappear before or at the same time as the dialog.

What is the current behavior?

The option list disappears after the dialog has finished vanishing.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-bbsbdh
Click the button. Open the mat-select and press Escape while the options list is opened.

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

The sequence of actions is not logical and looks strange.

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

Angular 5 & 6, Material 5 & 6, across all TS, browser, and OS.

Is there anything else we should know?

@wartab wartab changed the title Opened option list of a mat-select within a mat-dialog closes after dialog has disappeared Opened option list of a mat-select within a mat-dialog only closes after dialog has disappeared Apr 11, 2018
@crisbeto crisbeto self-assigned this Apr 11, 2018
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent has pr labels Apr 11, 2018
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 11, 2018
…ayKeyboardDispatcher

Currently when dispatching events through the `OverlayKeyboardDispatcher` we try to match one of the overlays to the element that triggered the event. This is problematic, because some components will open an overlay, but will keep focus on the trigger element (e.g. `mat-autocomplete` and `mat-select`). These changes switch the logic so the keyboard events are always dispatched to the top-level overlay.

Fixes angular#10799.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 11, 2018
…ayKeyboardDispatcher

Currently when dispatching events through the `OverlayKeyboardDispatcher` we try to match one of the overlays to the element that triggered the event. This is problematic, because some components will open an overlay, but will keep focus on the trigger element (e.g. `mat-autocomplete` and `mat-select`). These changes switch the logic so the keyboard events are always dispatched to the top-level overlay.

Fixes angular#10799.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 26, 2018
…ayKeyboardDispatcher

Currently when dispatching events through the `OverlayKeyboardDispatcher` we try to match one of the overlays to the element that triggered the event. This is problematic, because some components will open an overlay, but will keep focus on the trigger element (e.g. `mat-autocomplete` and `mat-select`). These changes switch the logic so the keyboard events are always dispatched to the top-level overlay.

Fixes angular#10799.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 27, 2018
…ayKeyboardDispatcher

Currently when dispatching events through the `OverlayKeyboardDispatcher` we try to match one of the overlays to the element that triggered the event. This is problematic, because some components will open an overlay, but will keep focus on the trigger element (e.g. `mat-autocomplete` and `mat-select`). These changes switch the logic so the keyboard events are always dispatched to the top-level overlay.

Fixes angular#10799.
andrewseguin pushed a commit that referenced this issue Apr 28, 2018
…ayKeyboardDispatcher (#10807)

Currently when dispatching events through the `OverlayKeyboardDispatcher` we try to match one of the overlays to the element that triggered the event. This is problematic, because some components will open an overlay, but will keep focus on the trigger element (e.g. `mat-autocomplete` and `mat-select`). These changes switch the logic so the keyboard events are always dispatched to the top-level overlay.

Fixes #10799.
@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 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
2 participants