angular / material

Material design for AngularJS
https://material.angularjs.org/
MIT License
16.55k stars 3.39k forks source link

select: not working with $mdPanel #8773

Open ghost opened 8 years ago

ghost commented 8 years ago

Actual behavior: *

CodePen or Steps to reproduce the issue: *

Angular Versions: *

Additional Information:

bloArribas commented 8 years ago

I confirm $mdPanel will not allow md-select to pop up properly, nor any other overlayed content. Date picker does not work either. I need some kind of modal or panel to use, that will allow these elements to be used.

bloArribas commented 8 years ago

Rahul, I found out it can be solved by setting up the panel with the option trapFocus=false.

ghost commented 8 years ago

No, i tried to setting up the panel with the option trapFocus=false. it's still not working #bloArribas. is there any alternate way to use some king of model or i should have to create it by myself.

bradrich commented 8 years ago

This actually has to do with the z-index settings of md-select and md-panel. md-select's z-index is set to 90. md-panel has a default z-index of 80, but it allows you to set the z-index through a zIndex property through the controller. If you set the zIndex to something higher than 105, you lose most of the Angular Material features.

@Rahul-Giri, see your original pen: http://codepen.io/rahulG/pen/pbbNbq. Comment out line 38 of the JS code to remove the zIndex of the config (setting the z-index of the panel to its 80 default). Everything will work as expected.

@ThomasBurleson, would it be satisfactory to put a cap on the z-index of md-panel, possibly of 89. If so, this would allow select, calendar-pane, menu, tooltip and toast to keep a higher z-index. Or, the proper elements from each of these components could have higher z-index's added in the md-panel CSS.

bradrich commented 8 years ago

EDIT of last comment: I meant that we could step through the child elements of the md-panel and add higher z-index values. NOT added in the CSS. Late night when I wrote that comment.

ThomasBurleson commented 8 years ago

@ErinCoughlan - I think this should be discussed and plan with you.

ghost commented 8 years ago

Hmm, but this issue is really pain. because most of us will definitely gonna need md-select working on md-panel. better if angular material team fix this issue as soon as possible .

topherfangio commented 8 years ago

@bradrich Aside from increasing our CSS, is there an issue with updating our CSS to like add 100 to the z-index of all of those elements?

md-select {
  z-index: 90;
}
md-dialog, md-panel {
  z-index: 100;
}
md-dialog md-select, md-panel md-select {
  z-index: 190;
}

Or something similar so that the z-index gets updated appropriately inside panels/dialogs? We would need to do this for other elements as well I suppose.

ErinCoughlan commented 8 years ago

@topherfangio Setting the default z-index to work with other elements makes sense, especially since that's what dialog did.

@bradrich I do not want to force mdPanel to always have z-index set to something below 89. When using mdPanel with non-material components, many of the z-index have to be increased. I have one product who sets menus to 1,000,000 and toolbars to 1,000 (which is extreme, but we need to work with them).

stalinb87 commented 7 years ago

there is a workaround with this issue ?

josentiago commented 7 years ago

I solve this issue setting the zIndex to 65 (less than the default 80) in the mdPanel configuration