splide
splide copied to clipboard
loop with perMove cant loop correctly right side
Checks
- [X] Not a duplicate.
- [X] Not a question, feature request, or anything other than a bug report directly related to Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions
Version
v4.0.6
Description
When SplideJS is set to loop and perMove same as the perPage, looping with the right arrow does not work after it loops to the end. If we use other type or if we add focus: 0
, it works fine.
{
type: "loop",
perPage: 5,
perMove: 5
}
Reproduction Link
https://woocore.oxyninja.com/product/fresh-retro-bt-speaker/
Steps to Reproduce
_ON_YOUMAYLIKE.destroy();
var _ON_YOUMAYLIKE = new Splide("#-oxyninja_slider-292-126 .splide", {
type: "loop",
perPage: 5,
perMove: 5,
});
_ON_YOUMAYLIKE.mount();
Expected Behaviour
It should loop in the same way as we click/loop with a left arrow.
How about removing perMove
? Basically, you don't have to set the option if the number is same with perPage
.
@NaotoshiFujita
Thanks, that worked, but if I change it to this:
{
type: "loop",
perPage: 4,
perMove: 2
}
The issue is still the same, not on the link above, but on our staging site. You can try it at this link (new arrival section): https://woocommerce-410353-2033829.cloudwaysapps.com/
_ON_NEWARRIVALS.destroy();
var _ON_NEWARRIVALS = new Splide("#-oxyninja_slider-106-67 .splide", {
type: "loop",
perPage: 4,
perMove: 2,
});
_ON_NEWARRIVALS.mount();
I am not quite sure where to look, if this is kind of a CSS issue or something similar. Thanks :)
Thanks! I've been debugging this issue and found the bug. I'll fix it when I have time.
@NaotoshiFujita Thank you! Appreciate it 🔥
Fixed in the latest version.
@NaotoshiFujita Thank you! 🔥