From a2a8538948db6286a831e68705b9278c6a1d5359 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sun, 5 Oct 2025 10:41:54 -0500 Subject: [PATCH] Prevent photo selection in lightboxes --- src/admin/select/SelectPhotosProvider.tsx | 2 +- src/photo/PhotoGrid.tsx | 4 +++- src/photo/PhotoLightbox.tsx | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/admin/select/SelectPhotosProvider.tsx b/src/admin/select/SelectPhotosProvider.tsx index 0dd579d5..cbea400e 100644 --- a/src/admin/select/SelectPhotosProvider.tsx +++ b/src/admin/select/SelectPhotosProvider.tsx @@ -32,7 +32,7 @@ export default function SelectPhotosProvider({ useState(false); const getPhotoGridElements = useCallback(() => - document.querySelectorAll(`[${DATA_KEY_PHOTO_GRID}]`) + document.querySelectorAll(`[${DATA_KEY_PHOTO_GRID}=true]`) , []); useEffect(() => { diff --git a/src/photo/PhotoGrid.tsx b/src/photo/PhotoGrid.tsx index c19ab00c..f43dbd01 100644 --- a/src/photo/PhotoGrid.tsx +++ b/src/photo/PhotoGrid.tsx @@ -23,6 +23,7 @@ export default function PhotoGrid({ staggerOnFirstLoadOnly = true, additionalTile, small, + selectable = true, onLastPhotoVisible, onAnimationComplete, ...categories @@ -36,6 +37,7 @@ export default function PhotoGrid({ staggerOnFirstLoadOnly?: boolean additionalTile?: ReactNode small?: boolean + selectable?: boolean onLastPhotoVisible?: () => void onAnimationComplete?: () => void } & PhotoSetCategory) { @@ -50,7 +52,7 @@ export default function PhotoGrid({ } = useSelectPhotosState(); return ( -
+
{utility.more}
: undefined} + selectable={false} small />