-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Fix bullet and click event problem when slideCount <= slidesToShow #2822
Conversation
@kenwheeler any suggestion or comment? I really need this fix. At the moment I'm using my fork, but I still hope using yours. |
I also need this fix. In the short term I plan to use this fork. Thanks to flaviocysne. My problem was that a call to slickGoTo was ignored (in slideHandler), because slideCount <= slidesToShow. |
On my call to slickGoTo, I had to pass the "dontAnimate" argument as true. Without that, only the selected slide was visible, at the left (it's actually the last of 3, with slidesToShow = 3). Haven't figured out why yet. |
Thanks for the PR. I definitely'd like to review this and get it merged. Would speed things along if someone could get the ball rolling on some testing. Here's a codepen with a bunch of different cases to make sure aren't being broken by the change -- just replace the slick.js with your fork ala rawgit or something. |
Thanks for the PR ! I have tested it on my project and it solves the slickGoTo method bug. Just a suggestion of improvement if I may, the infinite option doesn't seem to work when the number of slides <= slideToShow. It could be great to correct this :) |
@pnewman8 could you publish a Code Pen sample or a Flickr sample that I can use to test against? @leggomuhgreggo forked your pen and changed slideToShow values to the same number of slides per example. Let me know of any unexpected behavior, please. https://codepen.io/flaviocysne/pen/BRWmBK @nsarradin what is the expected behavior when infinte is true and numer of slides <= slidesToShow? I didn't change it because I thought that arrows are used to change carrousel pages, not to change slides. |
@kenwheeler is there anything still needed to accept this PR? |
Fix for the Issue #2821
This PR enable click events if number of slides is less than slidesToShow.
One bullet is shown when slideCount is lesser or equal than slidesToShow, also enabling currentSlide to be reset after changing its value.