Skip to content

Commit

Permalink
Add overflow: hidden to .euiModal__flex (elastic#2164)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos authored and thompsongl committed Sep 10, 2019
1 parent 42057b3 commit 5ee3dd5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Fixed `.eui-textBreakWord` utility class to be cross-browser compatible ([#2157](https://github.com/elastic/eui/pull/2157))
- Fixed truncation and z-index of `EuiFilePicker` ([#2145](https://github.com/elastic/eui/pull/2145))
- Fixed `EuiNavDrawer`'s support for flyout groups in production/minified builds ([#2178](https://github.com/elastic/eui/pull/2178))
- Fixed width overflow of `EuiModal` ([#2164](https://github.com/elastic/eui/pull/2164))

## [`13.0.0`](https://github.com/elastic/eui/tree/v13.0.0)

Expand Down
11 changes: 10 additions & 1 deletion src-docs/src/views/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
EuiOverlayMask,
EuiRange,
EuiSwitch,
EuiCodeBlock,
} from '../../../../src/components';

import SuperSelectComplexExample from '../super_select/super_select_complex';
Expand Down Expand Up @@ -71,6 +72,12 @@ export class Modal extends Component {
<EuiFormRow label="A SuperSelect field">
<SuperSelectComplexExample />
</EuiFormRow>

<EuiCodeBlock language="html" paddingSize="s" isCopyable>
{
'<h1>Titleisonelonglinejfdklsjaflkdsajfkldsajfklsdajfkldsjafkldsjalfkjdsklafjdsklafjkldsajfkldsajfkldsjfkdsjaflsdjaf;djsakfjdskafjdsklafjdksljfkdlsa;jfldksjfkldsajfkldsjflkdsjaklfadjs;</h1>'
}
</EuiCodeBlock>
</EuiForm>
);

Expand All @@ -81,7 +88,9 @@ export class Modal extends Component {
<EuiOverlayMask>
<EuiModal onClose={this.closeModal} initialFocus="[name=popswitch]">
<EuiModalHeader>
<EuiModalHeaderTitle>Form in a modal</EuiModalHeaderTitle>
<EuiModalHeaderTitle>
Titleisonelonglinejfdklsjaflkdsajfkldsajfklsdajfkldsjafkldsjalfkjdsklafjdsklafjkldsajfkldsajfkldsjfkdsjaflsdjaf
</EuiModalHeaderTitle>
</EuiModalHeader>

<EuiModalBody>{formSample}</EuiModalBody>
Expand Down
3 changes: 2 additions & 1 deletion src/components/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
animation: euiModal $euiAnimSpeedSlow $euiAnimSlightBounce;

.euiModal__flex { /* 1 */
flex: 1;
flex: 1 1 auto;
display: flex;
flex-direction: column;
max-height: 75vh; // We overflow the modal body based off this
overflow: hidden; // Ensure long, non-breaking text doesn't expand beyond the modal bounds
}
}

Expand Down

0 comments on commit 5ee3dd5

Please sign in to comment.