Skip to content

Commit fbf330a

Browse files
committed
fix(sidenav): fullscreen sidenavs should not scroll
1 parent ca5339b commit fbf330a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/components/sidenav/sidenav.scss

+5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
6464
// TODO(hansl): Update this with a more robust solution.
6565
&[fullscreen] {
6666
@include md-sidenav-fullscreen();
67+
68+
&.md-sidenav-opened {
69+
overflow: hidden;
70+
}
6771
}
6872

6973
// Need this to take up space in the layout.
@@ -108,6 +112,7 @@ $md-sidenav-push-background-color: md-color($md-background, dialog) !default;
108112
bottom: 0;
109113
z-index: 3;
110114
min-width: 5%;
115+
overflow-y: scroll;
111116

112117
background-color: $md-sidenav-background-color;
113118

src/components/sidenav/sidenav.ts

+4
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@ export class MdSidenavLayout implements AfterContentInit {
351351
private _getPositionRight() {
352352
return this._getSidenavEffectiveWidth(this._right, 'push');
353353
}
354+
355+
@HostBinding('class.md-sidenav-opened') private get _isOpened() {
356+
return this._isShowingBackdrop();
357+
}
354358
}
355359

356360

src/demo-app/demo-app.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
}
1010

1111
md-sidenav {
12-
width: 15%;
12+
min-width: 15%;
1313

1414
[md-button] {
1515
width: 100%;
16-
position: absolute;
16+
position: relative;
1717
bottom: 0;
1818
margin-bottom: 24px;
1919
}

0 commit comments

Comments
 (0)