Search code examples
javascriptdraggableowl-carousel-2

OwlCarousel2 - drag of 1 pixel issue


In the demo page of Owl Carousel 2 I just noticed that when you drag the slider of 1 pixel from left to right direction, the carrousel slide all the way to the left, and just the last tile is visible.

If you drag it with 'what ever you want amount of pixel' (but not just one) you can't reach this state. But anyway, by dragging of 1px, I guess the slider should just return to its previous position.

It could be hard to reproduce depends on your mouse/pad precision because dragging of one pixel is not that easy, but I can assure you it happens on all browser.

Is it a bug ? Or, Is there some way to prevent that strange behavior ?

I already create an issue for this but I feel that I have more chance to get some feedback here !

Any help would be appreciated :)


Solution

  • I finally found the solution, in fact the problem is that the drag event is not fired on the first pixel dragged. I created a pull request for this problem if you want more details.