material icon indicating copy to clipboard operation
material copied to clipboard

md-menu inside md-sidenav click to close issue

Open martinbrylski opened this issue 11 years ago • 4 comments

Using a md-menu inside a md-sidenav all clicks on the sidenav will be ignored. The intended behavior should be, that the menu closes if clicked outside of the menu.

I think the problem is the z-index (50 for md-menu, 60 for md-sidenav).

martinbrylski avatar Jul 17 '15 11:07 martinbrylski

Same issue over here!

anjroo avatar Jul 17 '15 14:07 anjroo

$z-index-menu: 99 !default;
$z-index-dialog: 80 !default;
$z-index-toast: 90 !default;
$z-index-bottom-sheet: 70 !default;
$z-index-scroll-mask: 65 !default;
$z-index-sidenav: 60 !default;
$z-index-backdrop: 50 !default;

mdMenu has a z-index == 99; while mdSideNav z-index == 60. The issue, I believe, is that both the mdSideNav and mdMenu use a backdrop element.

ThomasBurleson avatar Jul 17 '15 14:07 ThomasBurleson

Have you tried this with the latest code in bower-material/master?

  • Which version of Angular Material are you using?
  • Which version of Angular are you using?

Please provide a CodePen or Plunkr to help us investigate and debug this issue. Here are some starter demo templates that you can use/fork:

  • CodePen template: http://codepen.io/team/AngularMaterial/pen/BNYppz
  • Plunkr template: http://plnkr.co/edit/yP0gB9iTacIQb48thud8?p=preview.

ThomasBurleson avatar Jul 17 '15 15:07 ThomasBurleson

Couldn't reproduce, here's a codepen

EladBezalel avatar Oct 01 '15 20:10 EladBezalel