Skip to content

Commit 967867d

Browse files
Fix IE specific flexbox min-height issue (#66555) (#66960)
* Fix IE specific flexbox min-height issue * Use internetExplorerOnly mixin * Fix other issues in IE * Add a comment Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent c6b1c7e commit 967867d

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

src/core/public/rendering/_base.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
margin: 0 auto;
7676
min-height: calc(100vh - #{$euiHeaderHeightCompensation});
7777

78+
@include internetExplorerOnly {
79+
// IE specific bug with min-height in flex container, described in the next link
80+
// https://github.com/philipwalton/flexbugs#3-min-height-on-a-flex-container-wont-apply-to-its-flex-items
81+
height: calc(100vh - #{$euiHeaderHeightCompensation});
82+
}
83+
7884
&.hidden-chrome {
7985
min-height: 100vh;
8086
}

src/plugins/vis_default_editor/public/_default.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@
7070

7171
.visEditor__visualization {
7272
display: flex;
73-
flex-basis: 100%;
74-
flex: 1;
73+
flex: 1 1 auto; // Fixes IE bug: the editor overflows a visualization on small screens
7574
overflow: hidden;
7675

7776
@include euiBreakpoint('xs', 's', 'm') {

src/plugins/vis_default_editor/public/_sidebar.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
.visEditorSidebar {
66
min-width: $vis-editor-sidebar-min-width;
7+
8+
// a hack for IE, issue: https://github.com/elastic/kibana/issues/66586
9+
> .visEditorSidebar__formWrapper {
10+
flex-basis: auto;
11+
}
712
}
813

914
.visEditorSidebar__form {

src/plugins/vis_default_editor/public/components/sidebar/sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function DefaultEditorSideBar({
177177
gutterSize="none"
178178
responsive={false}
179179
>
180-
<EuiFlexItem>
180+
<EuiFlexItem className="visEditorSidebar__formWrapper">
181181
<form
182182
className="visEditorSidebar__form"
183183
name="visualizeEditor"

0 commit comments

Comments
 (0)