Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Carousel: Frequently changed active slide and press navigation button crash the control #5178

Closed
mazavr opened this issue Jan 8, 2016 · 4 comments

Comments

@mazavr
Copy link
Contributor

mazavr commented Jan 8, 2016

Chrome 47.0.2526.106 m
Please, see http://plnkr.co/edit/mk5Pby?p=preview

User frequently clicks on links "go to slide ##", sometimes user see two or three slides at the same time.
When user see few slides he clicks on navigation button that appears above the links (left arrow, that means go to previous slide).
If user repeat these action few times the control will be broken.

@wesleycho
Copy link
Contributor

Is this present in an older version?

I believe this is fixed in the 1.0 release we just did and can't reproduce it, so I want to be sure.

@mazavr
Copy link
Contributor Author

mazavr commented Jan 8, 2016

I've used 1.0.0 version in my example. Previous version breaks when user clicks the links very often (without clicking navigation button at all). Now if user clicks only links... few slides appears as well, but one of them disappears after some time.

@wesleycho
Copy link
Contributor

Ah I see - yep, this is an issue. I created an imperfect fix in 1.0 that fixed it from completely breaking, but there is a problem here still.

Thanks for the clear reproduction.

@mazavr
Copy link
Contributor Author

mazavr commented Jan 9, 2016

Full break of the control might be solved by adding nextSlide.active = false next to place a slide to a buffer

    //Prevent this user-triggered transition from occurring if there is already one in progress
    if (nextSlide && nextSlide !== self.currentSlide && !$scope.$currentTransition) {
      goNext(nextSlide, nextIndex, direction);
    } else if (nextSlide && nextSlide !== self.currentSlide && $scope.$currentTransition) {
      bufferedTransitions.push(nextSlide);
      nextSlide.active = false;  // <--- Here
    }

I may create PR if needed

mazavr added a commit to mazavr/bootstrap that referenced this issue Jan 10, 2016
- Disable active state for slides in a buffer

fixes angular-ui#5178
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants