fix(🐛): Carousel throws error Unable to preventDefault inside passive event listener (#27957)

close #27927

https://github.com/akiran/react-slick/issues/1650
This commit is contained in:
偏右 2020-11-23 18:47:21 +08:00 committed by GitHub
parent e0c19e4a3d
commit 7041989b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@
touch-action: pan-y; touch-action: pan-y;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
.slick-list { .slick-list {
position: relative; position: relative;
display: block; display: block;
@ -56,9 +57,11 @@
} }
} }
} }
.slick-slider .slick-track, .slick-slider .slick-track,
.slick-slider .slick-list { .slick-slider .slick-list {
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
touch-action: pan-y;
} }
.slick-track { .slick-track {
@ -81,6 +84,7 @@
visibility: hidden; visibility: hidden;
} }
} }
.slick-slide { .slick-slide {
display: none; display: none;
float: left; float: left;
@ -90,6 +94,7 @@
img { img {
display: block; display: block;
} }
&.slick-loading img { &.slick-loading img {
display: none; display: none;
} }