This is a (multiple allowed):
When I set 'loop: true,'
When i click next / prev the slider triggers next / previous slide, even when the slider is still animating or in transition.
The slider next / prev only works when the animation or transition is finished. When I set the transition speed to 1000ms, I't takes 1000ms for the next / prev buttons to work.
This doesn't happen when loop is set to false.
Haven't found any thread about this issue.
Yes, this is by design, when loop enabled navigate is not allowed during transitions
Any explanation as to why this needs to be this way?
A client is not happy with this behaviour. May result in us moving onto a different library, unfortunately.
yes. As a photographer, my clients swipe through lots of images. It's such a better experience when they want to go back to that particular image and don't have to wait on the transition to end on every image. I know it's a minor thing, but looking for the best user experience here.
I just ran into this too. While working on a project I noticed that flickity seems to have no issue with this, yet regrettably the loop parameter requires transitions to complete before a subsequent click has any effect. This makes rapid fire slide advancement impossible with loop mode :-(
It looks like this is the culprit: https://github.com/nolimits4web/swiper/blob/v5.4.5/package/js/swiper.js#L2322
If I have some time I'll check and see if there's a way around it without rewriting the entire script.
It looks like this is the culprit: https://github.com/nolimits4web/swiper/blob/v5.4.5/package/js/swiper.js#L2322
Seems like it's not only that line. I've tried toying around with it but didn't manage to get it working.
Good luck!
Seems if you comment line 2322 AND line 2301 then it actually works!
Black magic! I swear I did exactly that but couldn't get it to work. Nice!
Yeh it just stinks to have to do this and I honestly have no idea what this might be breaking underneath it all.
Update: PR submitted as #3643
It seems to be working perfectly in your pen, even with autoplay on and disableOnInteraction set to false.
I agree, would be great to know what those lines are for. I haven't tested mobile yet but so far this makes me happy.
Thanks for the PR!
For anyone else finding this 5f44e87 fixes this with a new parameter called loopPreventsSlide. Simply set
loopPreventsSlide: false
and a Swiper that loops will now rapid fire advance without waiting for the transition to complete 馃檶馃徎