Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dmytro-sokolianskyi opened this issue Aug 25, 2021 · 3 comments
Closed

Comments

@dmytro-sokolianskyi
Copy link

dmytro-sokolianskyi commented Aug 25, 2021

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'

@kaitlynhung
Copy link

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

@guitassinari
Copy link

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;
}

@hoatepdev
Copy link

thanks @guitassinari sharing. I solved this same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants