mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
Cleaned up the modals iframe being in DOM when not shown
This commit is contained in:
parent
6d19323df2
commit
f011de6b5b
@ -4,14 +4,11 @@ import Modal from './Modal';
|
||||
|
||||
const GenericDialog = (props) => {
|
||||
// The modal will cover the whole screen, so while it is hidden, we need to disable pointer events
|
||||
const style = props.show ? {} : {
|
||||
pointerEvents: 'none'
|
||||
};
|
||||
return (
|
||||
<Modal show={props.show} style={style}>
|
||||
<Transition show={props.show}>
|
||||
<Modal>
|
||||
<div>
|
||||
<Transition
|
||||
show={props.show}
|
||||
<Transition.Child
|
||||
enter="transition duration-200 linear"
|
||||
enterFrom="opacity-0"
|
||||
enterTo="opacity-100"
|
||||
@ -33,9 +30,10 @@ const GenericDialog = (props) => {
|
||||
</div>
|
||||
</Transition.Child>
|
||||
</div>
|
||||
</Transition>
|
||||
</Transition.Child>
|
||||
</div>
|
||||
</Modal>
|
||||
</Transition>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user