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); }} >