Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(disableScroll): fix scroll mask z-index blocking backdrops
Browse files Browse the repository at this point in the history
closes #3283, closes #3269, closes #3245
  • Loading branch information
rschmukler committed Jun 21, 2015
1 parent 7ed0af6 commit b4eac13
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/components/backdrop/backdrop.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
md-backdrop {
z-index: $z-index-backdrop;
&.md-menu-backdrop {
z-index: $z-index-menu - 1;
}
&.md-select-backdrop {
z-index: $z-index-dialog + 1;
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/menu/menu-interim-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ function MenuProvider($$interimElementProvider) {
opts.backdrop && opts.backdrop.on('click', function(e) {
e.preventDefault();
e.stopPropagation();
opts.mdMenuCtrl.close(true);
scope.$apply(function() {
opts.mdMenuCtrl.close(true);
});
});

// Wire up keyboard listeners.
Expand Down
2 changes: 1 addition & 1 deletion src/core/util/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ angular.module('material.core')
// Creates a virtual scrolling mask to absorb touchmove, keyboard, scrollbar clicking, and wheel events
function disableElementScroll() {
var zIndex = $window.getComputedStyle(element[0]).zIndex - 1;
if (isNaN(zIndex)) zIndex = 99;
if (isNaN(zIndex)) zIndex = 50;
var scrollMask = angular.element(
'<div class="md-scroll-mask" style="z-index: ' + zIndex + '">' +
' <div class="md-scroll-mask-bar"></div>' +
Expand Down

0 comments on commit b4eac13

Please sign in to comment.