SolvedOwlCarousel2 The responsive function doesn't work when i set with autowidth(true) and loop(false)

It is ok in owl.carousel.2.0.0-beta.2.4;
JSFiddle Link: https://jsfiddle.net/JSDavi/7z1th3cx/

But it doesn't work in this new version of owl.carousel.2.1.0;
JSFiddle Link: https://jsfiddle.net/JSDavi/rtvc5exr/

Even in owl.carousel.2.1.4, it doesn't work;
JSFiddle Link: https://jsfiddle.net/JSDavi/cotyqt6x/1/

Also in owl.carousel.2.1.5, it doesn't work;
JSFiddle Link: https://jsfiddle.net/JSDavi/689q9zLd/

What I care is that I can't scroll to the last item.

Thanks.

47 Answers

✔️Accepted Answer

@CracyCrazz @hellor0bot
About @hellor0bot JSFiddle demo

Fiddle. It shall stop after slide No. 10, because the last three slides fit into the viewport. Funny thing, there's no such issue, when we set a margin though: margin: 1 will do

It will be ok, just only change from '>=' to '>' of this 'if' condition.
(And sorry, it is my fault.)

while (iterator--) {
    itemsWidth += this._items[iterator].width();
    if (itemsWidth > this.$element.width()) {
        break;
    }
}

And after modify, this is the new Fiddle which meet your feathure.
https://jsfiddle.net/JSDavi/cotyqt6x/6/

Related Issues:

251
OwlCarousel2 Can't vertical scroll page on mobile devices with full height owl carousel
After 4 hours of trying to fix this issue.. i finally found a fix using this version 2.2.1 of owlCar...
35
OwlCarousel2 Does not work with flexbox
Setting min-width: 0; on the container where the owl carousel is fixed it for me. ...
18
OwlCarousel2 Webpack npm error
@pascalporedda Just did a fresh installation with the latest version 2.3.2 from npm and added this: ...
17
OwlCarousel2 How to slider autoplay start and stop on mousehover and mouseleave?
My solution was add the stop() method to owl.carousel.js for Owl Carousel v2.2.0 At about line 2562 ...
17
OwlCarousel2 importing 'owl.carousel' with webpack causes Uncaught TypeError: Cannot read property 'fn' of undefined
You should add this code in your webpack config: I am trying to use Owl Carousel in my website manag...
5
OwlCarousel2 The responsive function doesn't work when i set with autowidth(true) and loop(false)
@CracyCrazz @hellor0bot About @hellor0bot JSFiddle demo Fiddle It shall stop after slide No 10 becau...