Initialize Embla with not enough slide content for the loop effect to work.
Embla makes the decision that the carousel doesn’t have enough slide content for the loop effect to work. So it automatically falls back to loop: false.
Change the slide content so it's enough to loop.
Run reInit().
When falling back to loop: false, Embla replaces the user provided loop option which was loop: true.
So from now on every reInit() call without the options parameter will be with loop: false.
What Embla should do is that it should reset the user provided loop option to loop: true after falling back to loop: false, which happens when when slide content isn’t enough for the loop effect to work.
So the next time reInit() is called, Embla should try loop: true again.
Expected behavior
Embla shouldn't replace the user provided loop option when it falls back to loop: false.
Additional context
Thanks @pReya for reporting this bug. Discussed in:
Bug is related to
Embla Carousel version
Describe the bug
loop: false
.reInit()
.loop: false
, Embla replaces the user provided loop option which wasloop: true
.reInit()
call without the options parameter will be withloop: false
.loop: true
after falling back toloop: false
, which happens when when slide content isn’t enough for the loop effect to work.reInit()
is called, Embla should tryloop: true
again.Expected behavior
loop: false
.Additional context
Thanks @pReya for reporting this bug. Discussed in:
413