From d0f6a844900244cf6527f74a3de83027f977d87e Mon Sep 17 00:00:00 2001 From: Vadym Shymko Date: Thu, 21 Mar 2024 22:46:02 +0200 Subject: [PATCH 1/3] remove listener for prevent click after prevent click on swipe end --- src/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.tsx b/src/index.tsx index 4d7ef99..d7c0bc8 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -681,6 +681,7 @@ function ReactSimplyCarousel({ function preventClick(clickEvent: TouchEvent | MouseEvent) { clickEvent.preventDefault(); clickEvent.stopPropagation(); + clickEvent.target?.addEventListener('click', preventClick as () => {}); } function handleListSwipe(event: TouchEvent | MouseEvent) { From 11f9fbcb22f0251d7f272704e482f3c8f6bd2871 Mon Sep 17 00:00:00 2001 From: Vadym Shymko Date: Thu, 21 Mar 2024 22:46:25 +0200 Subject: [PATCH 2/3] remove listener for prevent click after prevent click on swipe end --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index d7c0bc8..9adfd37 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -681,7 +681,7 @@ function ReactSimplyCarousel({ function preventClick(clickEvent: TouchEvent | MouseEvent) { clickEvent.preventDefault(); clickEvent.stopPropagation(); - clickEvent.target?.addEventListener('click', preventClick as () => {}); + clickEvent.target?.removeEventListener('click', preventClick as () => {}); } function handleListSwipe(event: TouchEvent | MouseEvent) { From 244c6818071df95a972e7cd9a5968f76c80f6f0e Mon Sep 17 00:00:00 2001 From: Vadym Shymko Date: Thu, 21 Mar 2024 22:47:52 +0200 Subject: [PATCH 3/3] Update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8361a8f..07ebbc7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-simply-carousel", - "version": "9.1.1", + "version": "9.1.2", "description": "A simple, lightweight, fully controlled isomorphic (with SSR support) React.js carousel component. Touch enabled and responsive. With support for autoplay and infinity options. Fully customizable", "files": [ "dist/"