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

Carousel slides initialized in a non-visible state remain inert even when the carousel becomes visible #2365

Open
patrick-mcdougle opened this issue Feb 5, 2025 · 0 comments
Labels
bug Things that aren't working right in the library.

Comments

@patrick-mcdougle
Copy link
Contributor

patrick-mcdougle commented Feb 5, 2025

Describe the bug

When a carousel is initialized it uses it's current visibility to determine if the slides should be marked as inert. If the carousel becomes visible (like through a drawer or something), the sides are in an incorrect state. When the inert attribute is on the slide, clickable elements within the slide are not clickable until the carousel has been interacted with.

To Reproduce

Steps to reproduce the behavior:

  1. Go to rothys.com, choose a product and add it to your cart
  2. Refresh the page (this is important, do not skip this step)
  3. Open the cart by clicking on the icon in the header
  4. Attempt to add the add-on item in the bottom of the cart to your cart

This reproduction will not be possible after Monday Feb. 10 because I will be applying a bandaid by manually calling initializeSlides on the carousel instance when the drawer is opened. I will attempt to create a reproduction in a more stable place while we ideate solutions in this library.

Update: A reproduction case can be found on codepen.

Browser / OS

  • OS: Mac
  • Browser: Chrome (I think any browser supporting the inert attribute)
  • Browser version: 132

Additional information

Provide any additional information about the bug here.

@patrick-mcdougle patrick-mcdougle added the bug Things that aren't working right in the library. label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that aren't working right in the library.
Projects
None yet
Development

No branches or pull requests

1 participant