Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loop with perMove cant loop correctly right side #813

Closed
2 tasks done
Rados51 opened this issue May 30, 2022 · 6 comments
Closed
2 tasks done

loop with perMove cant loop correctly right side #813

Rados51 opened this issue May 30, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@Rados51
Copy link

Rados51 commented May 30, 2022

Checks

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.

@Rados51 Rados51 added the bug Something isn't working label May 30, 2022
@NaotoshiFujita
Copy link
Collaborator

How about removing perMove? Basically, you don't have to set the option if the number is same with perPage.

@Rados51
Copy link
Author

Rados51 commented May 30, 2022

@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 :)

@NaotoshiFujita
Copy link
Collaborator

Thanks! I've been debugging this issue and found the bug.
I'll fix it when I have time.

@Rados51
Copy link
Author

Rados51 commented Jun 1, 2022

@NaotoshiFujita
Thank you! Appreciate it 🔥

@NaotoshiFujita
Copy link
Collaborator

Fixed in the latest version.

@Rados51
Copy link
Author

Rados51 commented Jun 12, 2022

@NaotoshiFujita Thank you! 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants