Fixing dialog close on click outside

This commit is contained in:
Jesús Espino 2021-06-04 19:38:44 +02:00
parent 46243c1ad1
commit 714855e712

View file

@ -28,15 +28,15 @@ const Dialog = React.memo((props: Props) => {
useHotkeys('esc', () => props.onClose())
return (
<div
className='Dialog dialog-back'
onMouseDown={(e) => {
if (e.target === e.currentTarget) {
props.onClose()
}
}}
>
<div className='wrapper' >
<div className='Dialog dialog-back'>
<div
className='wrapper'
onMouseDown={(e) => {
if (e.target === e.currentTarget) {
props.onClose()
}
}}
>
<div className='dialog' >
<div className='toolbar'>
{toolsMenu &&