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 modal min-width issue in IE11 #1174

Merged
merged 3 commits into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

- Added `maxWidth` prop to `EuiModal` ([#1165](https://github.com/elastic/eui/pull/1165))

**Bug fixes**

- Fixed an IE11 `EuiModal` width issue by changing the `min-width` to a pixel value ([#1174](https://github.com/elastic/eui/pull/1174))

## [`3.9.0`](https://github.com/elastic/eui/tree/v3.9.0)

- Added `infraApp` icon ([#1161](https://github.com/elastic/eui/pull/1161))
Expand Down
1 change: 0 additions & 1 deletion src-docs/src/views/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export class Modal extends Component {
<EuiOverlayMask>
<EuiModal
onClose={this.closeModal}
style={{ width: '400px' }}
>
<EuiModalHeader>
<EuiModalHeaderTitle >
Expand Down
2 changes: 2 additions & 0 deletions src/components/modal/_index.scss
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
@import "../form/variables";

@import "modal";
6 changes: 4 additions & 2 deletions src/components/modal/_modal.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
/**
* 1. Fix IE overflow issue (min-height) by adding a separate wrapper for the
* flex display. https://github.com/philipwalton/flexbugs#flexbug-3
* 2. IE has trouble with min-widths on flex elements. Use the pixel value
* from our forms since that's usually the smallest we want them.
*/

.euiModal {
border: $euiBorderThin;
@include euiBottomShadowLarge($adjustBorders: true);
display: flex; /* 1 */

position: relative;
position: relatie;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like a misspell here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh. Good catch. My vim fingers must have slipped!

background-color: $euiColorEmptyShade;
border-radius: $euiBorderRadius;
z-index: $euiZModal;
min-width: 50%;
min-width: $euiFormMaxWidth;
animation: euiModal $euiAnimSpeedSlow $euiAnimSlightBounce;

.euiModal__flex { /* 1 */
Expand Down