0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Cleaned up the modals iframe being in DOM when not shown

This commit is contained in:
Simon Backx 2022-07-21 15:31:26 +02:00
parent 6d19323df2
commit f011de6b5b

View file

@ -4,14 +4,11 @@ import Modal from './Modal';
const GenericDialog = (props) => { const GenericDialog = (props) => {
// The modal will cover the whole screen, so while it is hidden, we need to disable pointer events // 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 ( return (
<Modal show={props.show} style={style}> <Transition show={props.show}>
<Modal>
<div> <div>
<Transition <Transition.Child
show={props.show}
enter="transition duration-200 linear" enter="transition duration-200 linear"
enterFrom="opacity-0" enterFrom="opacity-0"
enterTo="opacity-100" enterTo="opacity-100"
@ -33,9 +30,10 @@ const GenericDialog = (props) => {
</div> </div>
</Transition.Child> </Transition.Child>
</div> </div>
</Transition> </Transition.Child>
</div> </div>
</Modal> </Modal>
</Transition>
); );
}; };