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

md-select overlay not dismissed inside dialog #2272

Closed
chpasha opened this issue Dec 18, 2016 · 3 comments · Fixed by #2276
Closed

md-select overlay not dismissed inside dialog #2272

chpasha opened this issue Dec 18, 2016 · 3 comments · Fixed by #2276
Assignees

Comments

@chpasha
Copy link

chpasha commented Dec 18, 2016

Bug, feature request, or proposal:

bug

What is the expected behavior?

if you open md-select inside md-dialog component and click somewhere outside of md-select overlay (but inside of dialog itself), the md-select overlay should be closed and onClose event should be fired

What is the current behavior?

now if you click inside dialog outside of md-select overlay, overlay is not closed. but if you click outside dialog overlay, it is closed

What are the steps to reproduce?

http://plnkr.co/edit/oIJQsOZVt0aKRFPe9rde

actually it is never dismissed in plunker, and what is worse, the overlay of md-select is shown below dialog overlay. But in real world application I get the behaviour described above - md-select is dismissed when clicking outside overlay, but not if it is within dialog

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

angular 2.2.4, material 2.0.0-alpha.11-3, ubuntu 14.04, Firefox 50.1, Chrome 55

@crisbeto
Copy link
Member

Your Plunkr breaks because it's missing some CSS (e.g. the overlay isn't position: absolute), however there definitely is an issue with the backdrop not being over the dialog.

@fxck
Copy link
Contributor

fxck commented Dec 19, 2016

Yes, there needs to be a proper stacking manager.

#1584 (comment)

@crisbeto crisbeto self-assigned this Dec 19, 2016
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 19, 2016
Currently backdrops get inserted after their corresponding overlays in the DOM. This can lead to situations where another overlay that is technically lower in the stacking order could go above a backdrop (e.g. opening a `select` inside a `dialog`). These changes switch to doing the stacking by having the overlay and backdrop have the same `z-index` and determining the stacking order by the order of the elements in the DOM.

Fixes angular#2272.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 19, 2016
Currently backdrops get inserted after their corresponding overlays in the DOM. This can lead to situations where another overlay that is technically lower in the stacking order could go above a backdrop (e.g. opening a `select` inside a `dialog`). These changes switch to doing the stacking by having the overlay and backdrop have the same `z-index` and determining the stacking order by the order of the elements in the DOM.

Fixes angular#2272.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 20, 2016
Currently backdrops get inserted after their corresponding overlays in the DOM. This can lead to situations where another overlay that is technically lower in the stacking order could go above a backdrop (e.g. opening a `select` inside a `dialog`). These changes switch to doing the stacking by having the overlay and backdrop have the same `z-index` and determining the stacking order by the order of the elements in the DOM.

Fixes angular#2272.
jelbourn pushed a commit that referenced this issue Dec 20, 2016
* fix(overlay): proper backdrop stacking with multiple overlays

Currently backdrops get inserted after their corresponding overlays in the DOM. This can lead to situations where another overlay that is technically lower in the stacking order could go above a backdrop (e.g. opening a `select` inside a `dialog`). These changes switch to doing the stacking by having the overlay and backdrop have the same `z-index` and determining the stacking order by the order of the elements in the DOM.

Fixes #2272.

* Fix wrong selectors after merge with master.
@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 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants