Skip to content

Commit

Permalink
fix(atomic): prevent clicks on atomic-product-image indicators from o…
Browse files Browse the repository at this point in the history
…pening the product page (#4534)

This PR prevents the product page from opening when clicking the
indicator buttons of the atomic-product-image carousel.

https://coveord.atlassian.net/browse/KIT-3652
  • Loading branch information
fpbrault authored Oct 16, 2024
1 parent c423e15 commit 4d53962
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ const CarouselIndicator: FunctionalComponent<CarouselIndicatorProps> = ({
? 'pointer-events-auto opacity-80'
: 'pointer-events-none hidden opacity-0'
}`}
onClick={() => navigateToImage(index)}
onClick={(event) => {
event.stopPropagation();
navigateToImage(index);
}}
></li>
);
})}
Expand Down

0 comments on commit 4d53962

Please sign in to comment.