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

Popup: Add z-index to popper container #4084

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modules/Popup/Popup.js
Expand Up @@ -179,7 +179,7 @@ export default class Popup extends Component {
// Heads up!
// A wrapping `div` there is a pure magic, it's required as Popper warns on margins that are
// defined by SUI CSS. It also means that this `div` will be positioned instead of `content`.
<div ref={popperRef} style={popperStyle}>
<div ref={popperRef} style={{ ...popperStyle, zIndex: 1900 }}>
<ElementType {...contentRestProps} className={classes} style={styles}>
{childrenUtils.isNil(children) ? (
<>
Expand Down
7 changes: 7 additions & 0 deletions test/specs/modules/Popup/Popup-test.js
Expand Up @@ -74,6 +74,13 @@ describe('Popup', () => {
.querySelector('[data-child]')
.should.not.equal(null, 'Popup did not render the child component.')
})

it('should add zIndex on the popper container', () => {
wrapperMount(<Popup open />)
const parentNode = document.body.querySelector('.ui.popup').parentNode

parentNode.style.zIndex.should.equal('1900')
})
})

describe('className', () => {
Expand Down