Fix #1217. Save dialog changes before closing. (#1218)

* Fix #1217. setTimeout(0) on dialog background click.

* Handle onClick instead of using setTimeout

Co-authored-by: Jesús Espino <jespinog@gmail.com>
This commit is contained in:
Chen-I Lim 2021-09-16 08:42:55 -07:00 committed by GitHub
parent 828748dd08
commit a66fbdbc6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ const Dialog = React.memo((props: Props) => {
<div className={`Dialog dialog-back ${props.className}`}>
<div
className='wrapper'
onMouseDown={(e) => {
onClick={(e) => {
if (e.target === e.currentTarget) {
props.onClose()
}