From 9ea7a1f4db8d189f5b2e3862875d4153bfb928f6 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 6 Jul 2024 09:47:42 +0800 Subject: [PATCH] Use onClose for this --- src/components/compose.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index de4cb698..77bd451d 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -2316,10 +2316,8 @@ function MediaAttachment({ {showModal && ( { - if (e.target === e.currentTarget) { - setShowModal(false); - } + onClose={() => { + setShowModal(false); }} >