From 3b1d24a27780ca53e233e88c8146e54cf3087743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Mon, 23 Nov 2020 18:37:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(=F0=9F=90=9B):=20Carousel=20throws=20error?= =?UTF-8?q?=20`Unable=20to=20preventDefault=20inside=20passive=20event=20l?= =?UTF-8?q?istener`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #27927 https://github.com/akiran/react-slick/issues/1650 --- components/carousel/style/index.less | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/carousel/style/index.less b/components/carousel/style/index.less index b31b62618a3d..e80cdc564dff 100644 --- a/components/carousel/style/index.less +++ b/components/carousel/style/index.less @@ -15,6 +15,7 @@ touch-action: pan-y; -webkit-tap-highlight-color: transparent; } + .slick-list { position: relative; display: block; @@ -56,9 +57,11 @@ } } } + .slick-slider .slick-track, .slick-slider .slick-list { transform: translate3d(0, 0, 0); + touch-action: pan-y; } .slick-track { @@ -81,6 +84,7 @@ visibility: hidden; } } + .slick-slide { display: none; float: left; @@ -90,6 +94,7 @@ img { display: block; } + &.slick-loading img { display: none; }