Skip to content

Commit 1e94d84

Browse files
Stop Swiper carousel from swallowing mouse events
This prevented menus from closing when clicking into empty space occupied by carousel rows.
1 parent 09e116b commit 1e94d84

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/homepage/carousel/SwiperCarousel.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ const SwiperCarousel = ({
7777
>
7878
<Swiper
7979
onSwiper={handleSwiper}
80+
// Swiper preventDefaults pointerdown by default, which suppresses the
81+
// compatibility mousedown/mouseup events that overlays (e.g. the Chakra
82+
// menu) rely on to detect an outside click and dismiss.
83+
touchStartPreventDefault={false}
8084
style={{
8185
...(padding !== undefined && { padding }),
8286
alignItems: "stretch",

0 commit comments

Comments
 (0)