Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix(dialog): Fix scrolling content overflowing on Chrome/Android. #4746

Merged
merged 19 commits into from
May 28, 2019
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/mdc-dialog/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,15 @@
// See https://github.com/philipwalton/flexbugs/issues/216
.mdc-dialog__container {
@include mdc-feature-targets($feat-structure) {
align-items: center;
display: flex;
flex-direction: row; // IE 11
justify-content: space-around; // Ensure Safari centers the dialog (because it treats the container's width oddly)
box-sizing: border-box;
height: 100%;
transform: scale(.8);
opacity: 0;
pointer-events: none;
}
}

Expand All @@ -98,8 +101,11 @@
flex-grow: 0; // IE 11
flex-shrink: 0; // IE 11
box-sizing: border-box;
width: 100%;
max-width: 100%; // IE 11
max-height: 100%; // IE 11
pointer-events: auto;
overflow-y: auto; // IE 11

@include mdc-rtl(".mdc-dialog") {
text-align: right;
Expand Down Expand Up @@ -385,7 +391,7 @@

@mixin mdc-dialog-max-width($max-width, $margin, $query: mdc-feature-all()) {
$feat-structure: mdc-feature-create-target($query, structure);
$max-size-calc-expr: calc(100vw - #{$margin * 2});
$max-size-calc-expr: calc(100% - #{$margin * 2});

.mdc-dialog__surface {
@include mdc-feature-targets($feat-structure) {
Expand All @@ -410,7 +416,7 @@

@mixin mdc-dialog-max-height($max-height, $margin, $query: mdc-feature-all()) {
$feat-structure: mdc-feature-create-target($query, structure);
$max-size-calc-expr: calc(100vh - #{$margin * 2});
$max-size-calc-expr: calc(100% - #{$margin * 2});

.mdc-dialog__surface {
@include mdc-feature-targets($feat-structure) {
Expand Down