Skip to content
Snippets Groups Projects
Commit bbaac89e authored by geta6's avatar geta6 Committed by Eugen Rochko
Browse files

Enable to handle app immediately after closing modal (#3082)

parent 0dfffb6d
No related branches found
No related tags found
No related merge requests found
...@@ -48,9 +48,10 @@ class ModalRoot extends React.PureComponent { ...@@ -48,9 +48,10 @@ class ModalRoot extends React.PureComponent {
render () { render () {
const { type, props, onClose } = this.props; const { type, props, onClose } = this.props;
const visible = !!type;
const items = []; const items = [];
if (!!type) { if (visible) {
items.push({ items.push({
key: type, key: type,
data: { type, props }, data: { type, props },
...@@ -69,7 +70,7 @@ class ModalRoot extends React.PureComponent { ...@@ -69,7 +70,7 @@ class ModalRoot extends React.PureComponent {
const SpecificComponent = MODAL_COMPONENTS[type]; const SpecificComponent = MODAL_COMPONENTS[type];
return ( return (
<div key={key}> <div key={key} style={{ pointerEvents: visible ? 'auto' : 'none' }}>
<div role='presentation' className='modal-root__overlay' style={{ opacity: style.opacity }} onClick={onClose} /> <div role='presentation' className='modal-root__overlay' style={{ opacity: style.opacity }} onClick={onClose} />
<div className='modal-root__container' style={{ opacity: style.opacity, transform: `translateZ(0px) scale(${style.scale})` }}> <div className='modal-root__container' style={{ opacity: style.opacity, transform: `translateZ(0px) scale(${style.scale})` }}>
<SpecificComponent {...props} onClose={onClose} /> <SpecificComponent {...props} onClose={onClose} />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment