Closed hybrid897 closed 5 months ago
Hi,
The simplest solution would be create new wrapping element around your images, example:
<div className="f-carousel__slide relative">
<div data-fancybox="gallery"
data-src="https://lipsum.app/id/60/1600x1200"
data-thumb-src="https://lipsum.app/id/60/200x150">
<img
alt=""
src="https://lipsum.app/id/60/400x300"
width="400"
height="300"
/>
</div>
<div className="custom-caption">Hello <a href="https://www.google.com">Test Link</a></div>
</div>
Describe the bug
I have an absolutely positioned element with a clickable link in it that overlays a carousel slide, the carousel is inside a fancybox. When I left click the link the fancybox opens instead of going to the link. Middle clicking the link seems fine.
How can I stop fancybox from opening for clicks on my overlayed element? Thanks
Reproduction
https://stackblitz.com/edit/react-ts-yfbtny?file=style.css
Additional context
No response