-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Conversation
src/core/public/rendering/_base.scss
Outdated
min-height: calc(100vh - #{$euiHeaderHeightCompensation}); | ||
// IE needs this to be "height" instead of "min-height" | ||
// "min-height" causes a bug 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}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with this switch is that the scrolls now must be managed by internal views. Not a huge deal, but we really try to keep the window scroll on the window instead of an individual element. If this problem truly only affected IE, let's keep min-height
by default but change to height
only for IE:
min-height: calc(100vh - #{$euiHeaderHeightCompensation});
@include internetExplorerOnly {
// IE needs this to be "height" instead of "min-height"
// "min-height" causes a bug 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});
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cchaos thanks for useful suggestion!
Done.
This also helped to reveal another IE specific bug in visualize, a separate issue created #66586 |
@elasticmachine merge upstream |
Pinging @elastic/kibana-app (Team:KibanaApp) |
…nto fix/ie_flexbox_height
|
||
// a hack for IE, issue: https://github.com/elastic/kibana/issues/66586 | ||
> .visEditorSidebar__formWrapper { | ||
flex-basis: auto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -70,8 +70,7 @@ | |||
|
|||
.visEditor__visualization { | |||
display: flex; | |||
flex-basis: 100%; | |||
flex: 1; | |||
flex: 1 1 auto; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
I tested this across Chrome/Firefox/Edge/IE11 and didn't find any other issues, all is working fine across all visualization types. Some of examples attached below:
small screen, area vis: wide screen: wide screen without data:
Data table vis, playing around with different screen sizes, inner scrollbars
playing around with Gauge vis on different screen sizes even Data table vis is working fine, wow 😎 The only browser I can't check in is Safari, so I would ask reviewers to do it 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in Safari and IE didn't notice any breakages
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't test in IE. I kept getting redirect errors, so I'll have to trust your testing in there. I did test, however, in Safari for you. I didn't notice any regressions in the visualize editor. 👍
@@ -70,8 +70,7 @@ | |||
|
|||
.visEditor__visualization { | |||
display: flex; | |||
flex-basis: 100%; | |||
flex: 1; | |||
flex: 1 1 auto; |
There was a problem hiding this comment.
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?
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Fix IE specific flexbox min-height issue * Use internetExplorerOnly mixin * Fix other issues in IE * Add a comment Co-authored-by: Elastic Machine <[email protected]>
* master: (24 commits) [APM] agent config 'profiling_inferred_spans_min_duration' default value is '0ms' but the min value in the field is '1ms' (elastic#66886) [Canvas] Fix flaky custom element functional tests (elastic#65908) Fix IE specific flexbox min-height issue (elastic#66555) [Discover] Unskip doc link functional test (elastic#66884) Index pattern management to Kibana platform (elastic#65026) Warning and link to support matrix for IE11 (elastic#66512) [Reporting] Consolidate Server Type Defs, move some out of Legacy (elastic#66144) [SIEM] [Maps] Fixes Network Map empty tooltip (elastic#66828) [Endpoint] Encode the index of the alert in the id response (elastic#66919) [services/testSubjects] reduce retry usage, add waitForEnabled (elastic#66538) [DOCS] Identifies cloud settings for APM (elastic#66935) [SIEM][CASE] Fix configuration's page user experience (elastic#66029) Resolver: Display node 75% view submenus (elastic#64121) [SIEM] Cases] Capture timeline click and open timeline in case view (elastic#66327) [APM] Lowercase agent names so icons work (elastic#66824) [dev/cli] add support for --no-cache (elastic#66837) [Ingest Manager] Better handling of package installation problems (elastic#66541) [ML] Enhances api docs for modules endpoints (elastic#66738) dont hide errors (elastic#66764) [RFC] Global search API (elastic#64284) ...
* Fix IE specific flexbox min-height issue * Use internetExplorerOnly mixin * Fix other issues in IE * Add a comment Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* Fix IE specific flexbox min-height issue * Use internetExplorerOnly mixin * Fix other issues in IE * Add a comment Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
Fixes #66282
Regression after #64018
Seems this is trapped into known IE bug:
flex items ignore their parent container’s height if it’s set via the min-height property
The bug is fully described here
One of the workarounds is to replace it with the
height
instead.Seems to be working fine across all browsers. Didn't find any issues.
Checked against Chrome/Firefox/Edge/IE11 across apps: Visualize, Dashboard, Graph, Canvas, Home, Dev Tools, Management.
This also fixes #66586
The fix based on adding
flex-basis: auto
to let container inherit the height of its descendant.This also fixes wrong height calculation of visualization on small screens in IE:
the editors overflows a visualization
Checklist
For maintainers