Fixing dialog close on click outside
This commit is contained in:
parent
46243c1ad1
commit
714855e712
1 changed files with 9 additions and 9 deletions
|
@ -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 &&
|
||||
|
|
Loading…
Reference in a new issue