| Index: chrome/browser/resources/ntp4/card_slider.js
|
| diff --git a/chrome/browser/resources/ntp4/card_slider.js b/chrome/browser/resources/ntp4/card_slider.js
|
| index 0cd671119532bca94149892b8c09b87cd8354848..ca18f4e90ae2304197ebc0a50263abdc9ae122ee 100644
|
| --- a/chrome/browser/resources/ntp4/card_slider.js
|
| +++ b/chrome/browser/resources/ntp4/card_slider.js
|
| @@ -263,13 +263,15 @@ var CardSlider = (function() {
|
| * current position to new position.
|
| */
|
| selectCard: function(newCardIndex, opt_animate) {
|
| - var isChangingCard = newCardIndex >= 0 &&
|
| - newCardIndex < this.cards_.length &&
|
| - newCardIndex != this.currentCard;
|
| + var isChangingCard =
|
| + !this.cards_[newCardIndex].classList.contains('selected-card');
|
| +
|
| if (isChangingCard) {
|
| + this.currentCardValue.classList.remove('selected-card');
|
| // If we have a new card index and it is valid then update the left
|
| // position and current card index.
|
| this.currentCard_ = newCardIndex;
|
| + this.currentCardValue.classList.add('selected-card');
|
| }
|
|
|
| this.transformToCurrentCard_(opt_animate);
|
|
|