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

Commit b4eac13

Browse files
committed
fix(disableScroll): fix scroll mask z-index blocking backdrops
closes #3283, closes #3269, closes #3245
1 parent 7ed0af6 commit b4eac13

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

src/components/backdrop/backdrop.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
md-backdrop {
22
z-index: $z-index-backdrop;
3+
&.md-menu-backdrop {
4+
z-index: $z-index-menu - 1;
5+
}
36
&.md-select-backdrop {
47
z-index: $z-index-dialog + 1;
58
}

src/components/menu/menu-interim-element.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ function MenuProvider($$interimElementProvider) {
127127
opts.backdrop && opts.backdrop.on('click', function(e) {
128128
e.preventDefault();
129129
e.stopPropagation();
130-
opts.mdMenuCtrl.close(true);
130+
scope.$apply(function() {
131+
opts.mdMenuCtrl.close(true);
132+
});
131133
});
132134

133135
// Wire up keyboard listeners.

src/core/util/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ angular.module('material.core')
6666
// Creates a virtual scrolling mask to absorb touchmove, keyboard, scrollbar clicking, and wheel events
6767
function disableElementScroll() {
6868
var zIndex = $window.getComputedStyle(element[0]).zIndex - 1;
69-
if (isNaN(zIndex)) zIndex = 99;
69+
if (isNaN(zIndex)) zIndex = 50;
7070
var scrollMask = angular.element(
7171
'<div class="md-scroll-mask" style="z-index: ' + zIndex + '">' +
7272
' <div class="md-scroll-mask-bar"></div>' +

0 commit comments

Comments
 (0)