Fix lightbox: close when clicking outside the photo itself
Move stopPropagation from the outer container to the image element only, so clicking dark space around the photo closes the lightbox. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
82ba5bb21a
commit
a44b7848dd
|
|
@ -258,11 +258,11 @@ function GallerySection() {
|
||||||
<line x1="6" y1="6" x2="18" y2="18"/>
|
<line x1="6" y1="6" x2="18" y2="18"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div
|
<div className="relative w-full h-full max-w-6xl max-h-[85vh] flex flex-col items-center justify-center">
|
||||||
className="relative w-full h-full max-w-6xl max-h-[85vh] flex flex-col items-center justify-center"
|
<div
|
||||||
onClick={(e) => e.stopPropagation()}
|
className="relative w-full flex-1 min-h-0"
|
||||||
>
|
onClick={(e) => e.stopPropagation()}
|
||||||
<div className="relative w-full flex-1 min-h-0">
|
>
|
||||||
<Image
|
<Image
|
||||||
src={selectedArtwork.src}
|
src={selectedArtwork.src}
|
||||||
alt={selectedArtwork.title}
|
alt={selectedArtwork.title}
|
||||||
|
|
@ -271,7 +271,10 @@ function GallerySection() {
|
||||||
sizes="(max-width: 768px) 100vw, 90vw"
|
sizes="(max-width: 768px) 100vw, 90vw"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p className="text-white/80 font-sans-alt text-sm tracking-widest mt-4 text-center">
|
<p
|
||||||
|
className="text-white/80 font-sans-alt text-sm tracking-widest mt-4 text-center"
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
{selectedArtwork.title}
|
{selectedArtwork.title}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue