diff --git a/app/soapbox/features/ui/components/modals/media-modal.tsx b/app/soapbox/features/ui/components/modals/media-modal.tsx index e59b90499..959c433fd 100644 --- a/app/soapbox/features/ui/components/modals/media-modal.tsx +++ b/app/soapbox/features/ui/components/modals/media-modal.tsx @@ -229,6 +229,12 @@ const MediaModal: React.FC = (props) => { } } + const handleClickOutside: React.MouseEventHandler = (e) => { + if ((e.target as HTMLElement).tagName === 'DIV') { + onClose(); + } + }; + return (
= (props) => { role='presentation' >