mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed generic dialogs closing when clicking inside them
This commit is contained in:
parent
b262d7010a
commit
dcfebd5e5f
1 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,10 @@ const GenericDialog = (props) => {
|
|||
dispatchAction('closePopup');
|
||||
};
|
||||
|
||||
const stopPropagation = (event) => {
|
||||
event.stopPropagation();
|
||||
};
|
||||
|
||||
return (
|
||||
<Transition show={props.show} appear={true}>
|
||||
<Frame type="fixed">
|
||||
|
@ -32,7 +36,7 @@ const GenericDialog = (props) => {
|
|||
leaveFrom="translate-y-0 opacity-100"
|
||||
leaveTo="translate-y-4 opacity-0"
|
||||
>
|
||||
<div className="bg-white w-[500px] p-8 rounded-xl text-center shadow-modal">
|
||||
<div className="bg-white w-[500px] p-8 rounded-xl text-center shadow-modal" onClick={stopPropagation}>
|
||||
{props.children}
|
||||
</div>
|
||||
</Transition.Child>
|
||||
|
|
Loading…
Add table
Reference in a new issue