ganlanyuan / tiny-slider

Vanilla javascript slider for all purposes.
MIT License
5.26k stars 786 forks source link

[bug] Dragging/swiping on sliders with lots of items ignores "slideBy" #626

Open crystalenka opened 4 years ago

crystalenka commented 4 years ago

Issue description: I've played with various settings and the only consistent thing I can find is that the sliders that are buggy have lots of items.

Swiping on a touch device or dragging in the browser seems to drag the whole slider in free-for-all instead of moving the slider by one.

Demo link/slider setting: https://dev.kp11studios.com/portfolio/shashank-and-supreeta Working slider on same site with same (ish) settings: https://dev.kp11studios.com/portfolio/sam-axe-jester

Tiny-slider version: 2.9.3 Browser name && version: All OS name && version: All

ivgalic commented 4 years ago

I'm experiencing the same issue, though I'm not sure if it's a bug or intended behaviour. Clicking 'next' or 'prev' goes through 'slide by' images, but swiping on mobile, or mouse dragging on desktop seems to slide through the whole carousel - images just flick through.

For me it seems to happen in all cases, even with few images (say 4).

crystalenka commented 4 years ago

I don't THINK it's intended behavior because prior versions of tinyslider did not do this... on phone it's certainly disconcerting, especially with 20+ images loaded.

ivgalic commented 4 years ago

You're right, the official demos don't seem to suffer from this either. It must be the structure of my/your html, but I can't see what I'm doing wrong.

crystalenka commented 4 years ago

The official demos have very few slides; I'm only experiencing it on sliders with 15+ full-width slides. :/ I don't even know how to begin debugging this.

crystalenka commented 4 years ago

@ganlanyuan Do you think you can help with this when you have time?