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

Add overflow: hidden to .euiModal__flex #2164

Merged
merged 5 commits into from
Jul 29, 2019
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Added `"center"` as an acceptable value to `EuiBasicTable`'s `align` proptype ([#2158](https://github.com/elastic/eui/pull/2158))
- 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 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