-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Carousel - Running SlideTo on active item results in hiding data #227
Comments
I don't think I understand the issue. |
The issue is that the active carousel disappears, just like the mentioned tab issue.. In my codepen example, the default carousel item index is |
OK I begin to understand. If you go next slide it always goes nicely but if you do However, this is a case where other carousel scripts try and duplicate slides for various reasons like swipe or simply making it able to work with anything you throw at it. We won't do that. We understand the context and manage these cases in most efficient manner to avoid breaking the basic functionality. For instance in this particular case here's what to do: we need to filter that specific case like so: function resetSlides() {
if ( myCarouselInit.getActiveIndex() !==0 ) { // this is now required
myCarouselInit.slideTo(0);
}
} So like many others, this is a case of user related issue, nothing to do with our script, so I'm going to close this, hoping the above will help you understand how to manage these cases. |
@thednp I know this is very specific, but a really easy solution could be added to this library to fix this kind of issue. Just check if the current item index is equal to the index of the next slide, if it is just return from function. All you have to do is go to the This will fix this issue completely. Please check line |
Perfectly acceptable solution. That's the spirit! Thanks |
Thanks, but are you going to include this fix into the library, would be awesome!? |
Yes @Vuurvlieg |
Awesome, thank you so much! |
@Vuurvlieg please test latest master and check the changes |
@thednp I've tested the latest master and everything works fine, thank you so much! |
Hi, its me again.
This issue is similiar like the Tabs in #187, but this time its affecting the Carousel component. When sliding to a already active item, the active item becomes hidden, which is wrong.
To reproduce:
interval: false
slideTo
and gives its current active item index.Check this example. Click the button to open the modal and then click the
reset button
. The result is that the active carousel item will be hidden.At least this is for V4 (not tested for V3).
The text was updated successfully, but these errors were encountered: