From 5f6691e059c47fafc403d01537fdd0fd0f076a35 Mon Sep 17 00:00:00 2001 From: David Ball Date: Sun, 14 Jul 2024 22:46:25 -0400 Subject: [PATCH] Added preventDefault() behavior on Carousel prev/next button click event handlers. --- src/components/ImageCarousel.astro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/ImageCarousel.astro b/src/components/ImageCarousel.astro index b16f744..cf6e0f8 100644 --- a/src/components/ImageCarousel.astro +++ b/src/components/ImageCarousel.astro @@ -59,9 +59,11 @@ class ImageCarousel extends HTMLElement { const nextButton = $(this).find('.carousel-btn-next'); prevButton.click((evt: Event) => { this.plusSlides(-1); + evt.preventDefault(); }); nextButton.click((evt: Event) => { this.plusSlides(1); + evt.preventDefault(); }); this.showSlide(this.slideIndex); } @@ -149,6 +151,7 @@ image-carousel { align-items: center; justify-content: center; font-size: 2rem; + outline: none !important; } /* .carousel-btn-prev > a span, .carousel-btn-next > a span { position: relative;