Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IE specific flexbox min-height issue #66555

Merged
merged 7 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from 5 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
6 changes: 6 additions & 0 deletions src/core/public/rendering/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
margin: 0 auto;
min-height: calc(100vh - #{$euiHeaderHeightCompensation});

@include internetExplorerOnly {
// IE specific bug with min-height in flex container, described in the next link
// https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
height: calc(100vh - #{$euiHeaderHeightCompensation});
}

&.hidden-chrome {
min-height: 100vh;
}
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/vis_default_editor/public/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@

.visEditor__visualization {
display: flex;
flex-basis: 100%;
flex: 1;
flex: 1 1 auto;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes another bug:
the editors overflows a visualization on small screens, the image attached in PR description.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment for this one as well so it doesn't get removed?

overflow: hidden;

@include euiBreakpoint('xs', 's', 'm') {
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/vis_default_editor/public/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

.visEditorSidebar {
min-width: $vis-editor-sidebar-min-width;

// a hack for IE, issue: https://github.com/elastic/kibana/issues/66586
> .visEditorSidebar__formWrapper {
flex-basis: auto;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be wrapped with internetExplorerOnly mixin.
Checked in all browsers except Safari, works fine.
Actually, this just overwrites EUI rule, which seems was created for another IE bug 😄 :

image

}
}

.visEditorSidebar__form {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function DefaultEditorSideBar({
gutterSize="none"
responsive={false}
>
<EuiFlexItem>
<EuiFlexItem className="visEditorSidebar__formWrapper">
<form
className="visEditorSidebar__form"
name="visualizeEditor"
Expand Down