Forums Carousel

BUG - When you don't have enough images...

Subscribe to BUG - When you don't have enough images...
3 post(s), 2 voice(s)

 
Avatar Jangla 26 post(s)

...to fill a carousel, the buttons don’t update to the correct state i.e. they should both be disabled but the next button isn’t.

 
Avatar Jangla 26 post(s)

Anyone from the prototype team want to acknowledge this is a bug?

 
Avatar bb01 4 post(s)

I ran into this problem with a carousel that I have dynamically generated. The carousel shows two images at a time, but when there is only one image, the next arrow wouldn’t go to the disabled state.

So under the updateNextButton: function(), I added this:

if (!this.nextButton.hasClassName(nextClassName) && lastPosition < size) { this.nextButton.addClassName(nextClassName); this.fire(‘nextButton:disabled’);
}

This should work for any number of images.

Forums Carousel