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

WrapAround is not working as expected, When on first slide the last adjacent slide flickers and similarly happens on the last slide. #1314

Open
rajatjyotishi opened this issue Dec 9, 2024 · 0 comments

Comments

@rajatjyotishi
Copy link

rajatjyotishi commented Dec 9, 2024

The wrapAround property in Flickity is not functioning as expected. When enabled, the carousel should seamlessly loop back to the beginning when reaching the end of the slides. However, in my implementation, the slides do not wrap around correctly, and the carousel stops at the last slide.

Steps to Reproduce

  1. Initialize a Flickity carousel with the wrapAround option set to true.
  2. Add multiple slides to the carousel.
  3. Attempt to navigate through the slides to observe the wrap-around behavior.

Expected Behavior
The carousel should loop back to the first slide after reaching the last slide, creating a seamless wrap-around effect.

Actual Behavior
When on first slide the last adjacent slide flickers and similarly when on last slide the adjacent first slides flickers.

const carouselElement = el.querySelector(`.${CAROUSEL_CLASS_NAME}`);
const flickity = new Flickity(carouselElement, {
          wrapAround: true,
          imagesLoaded: true,
          accessibility: true,
          adaptiveHeight: true,
          autoPlay: Number(el.dataset.speed) || false,
          pageDots: el.dataset.slideDots === 'true',
          prevNextButtons: el.dataset.prevNextButtons === 'true',
          lazyLoad: true,
        });

  • Flickity version: ^2.3.0
    Using this with apostrophe, version 4.8.1.

Please let me know if you need any further information or if there are any workarounds for this issue.

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

No branches or pull requests

1 participant