From 5fab75022278a7e34ff4c4eb191aae84262b2552 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 8 Dec 2025 14:10:58 -0600 Subject: [PATCH] Clicking outside the lightbox closes it --- src/components/ImageLightbox.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/ImageLightbox.tsx b/src/components/ImageLightbox.tsx index 5f107598..ce5da053 100644 --- a/src/components/ImageLightbox.tsx +++ b/src/components/ImageLightbox.tsx @@ -21,11 +21,17 @@ export function ImageLightbox({ imageUrl, onClose }: ImageLightboxProps) { "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95" )} - onPointerDownOutside={onClose} onEscapeKeyDown={onClose} > {imageUrl && ( <> + {/* Clickable background to close */} +
+ {/* Close button */}