davidjerleke / embla-carousel

A lightweight carousel library with fluid motion and great swipe precision.
https://www.embla-carousel.com
MIT License
5.42k stars 164 forks source link

Scoll Snaps get out of sync with looping and the wheel gestures plugin #508

Closed nicholasengleman closed 1 year ago

nicholasengleman commented 1 year ago

Bug is related to

Embla Carousel version

Describe the bug

Not sure if this is an issue with the carousel or with the wheel gestures plugin

CodeSandbox

Steps to reproduce

  1. Create a gallery with 15 slides that are variable widths and this configuration: const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true, skipSnaps: true }, [WheelGesturesPlugin()]);

Expected behavior

Additional context

davidjerleke commented 1 year ago

@nicholasengleman did you solve this somehow? It's good to know if someone else runs into this problem.

nicholasengleman commented 1 year ago

@davidjerleke Yes the fix was to set overflow-x: hidden; on the embla__viewport element.