react-slick icon indicating copy to clipboard operation
react-slick copied to clipboard

Slide as link element is always clicked on the last element.

Open dmitriy-sokolyanskiy opened this issue 3 years ago • 3 comments

const settings = {
    dots: true,
    infinite: true,
    speed: 500,
    slidesToShow: 1,
    slidesToScroll: 1,
    autoplay: true,
    autoplaySpeed: 1500,
    **fade: true,   // because of this**
}   
[
    {url: '/images/1_banner.jpg'},
    {url: '/images/2_banner.jpg'},
    {url: '/images/3_banner.jpg'},
  ].map((image) => {
return (
<Slider {...settings}>
  <a href={image.url}>
      <img src={image.url} alt={image.url} />
  </a>
</Slider>
)

When I click on any slide it always goes to '/images/3_banner.jpg'

dmitriy-sokolyanskiy avatar Aug 25 '21 19:08 dmitriy-sokolyanskiy

it happens to me 2... It's weird and i hope this can be fixed

kaitlynhung avatar Sep 07 '21 09:09 kaitlynhung

Hey guys. Having this problem here too. Had to work around the issue. Here's a small snippet that at least solves the problem for now:

.slick-slide:not(.slick-active) {
    pointer-events: none;
}

guitassinari avatar Dec 02 '21 16:12 guitassinari

thanks @guitassinari sharing. I solved this same problem.

hoatepdev avatar Mar 17 '22 20:03 hoatepdev