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

When using fade, slides are still stacked, meaning links etc on lower slides are inaccessible #1167

Open
ghost opened this issue Apr 4, 2018 · 7 comments

Comments

@ghost
Copy link

ghost commented Apr 4, 2018

When using the fade options, slides are not actually set to display: none their visibility and opacity is just altered. This means that which ever slide is last in the list is the one which is actually clickable. For example, create a slideshow of images with links - https://codesandbox.io/s/7j6j388070 - No matter which slide is shown, you can only ever get to the link on the last slide.

Once a slide isn't visible it needs it's display property changing so it doesn't affect the other slides and sit on top of them.

@VinceSJ
Copy link

VinceSJ commented Apr 4, 2018

I had the same issue just yesterday. I made this component as a workaround:

const ClickableEnvironmentInCarousel = ({ children }) => {
  return (
    <WhateverBoxDivThingYouUse
      position="relative"
      zIndex="1"
    >
      {children}
    </WhateverBoxDivThingYouUse>
  );
};

By wrapping that around whatever elements needed to be clickable, they would "elevated" when that carousel slide was active and thus clickable. Bit hacky, but it works until a proper fix gets implemented.

(Of course, you'll need some sort of implementation to pass the appropriate CSS position and z-index for the container div that does the elevating.)

@ghost
Copy link
Author

ghost commented Apr 5, 2018

Thanks for that. I decided it was easier just to do the following which seems to work :)

.slick-slide.slick-active { z-index: 999; }

@chicgeek
Copy link

Alternate CSS workaround:

.slick-slide { pointer-events: none; }
.slick-active { pointer-events: auto; }

Though I'd like to see this fixed in the core code.

@stale
Copy link

stale bot commented Apr 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 21, 2019
@marioelo
Copy link

I have the same problem and I think the @chicgeek solution is the right one to avoid conflicts with other elements z-index.

@stale stale bot removed the stale label Apr 24, 2019
@lamellama
Copy link

This is still happening but thanks chicgeek

@elkelk
Copy link

elkelk commented Mar 23, 2022

This issue has reappeared after being fixed previously: #852.

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

5 participants