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

Carousel prev/next slide incorrect after double clicking page control #5967

Closed
Skawt2k opened this issue Jun 6, 2016 · 13 comments
Closed

Carousel prev/next slide incorrect after double clicking page control #5967

Skawt2k opened this issue Jun 6, 2016 · 13 comments

Comments

@Skawt2k
Copy link

Skawt2k commented Jun 6, 2016

Bug description:

When double clicking the previous/next control or clicking the previous/next control again before the current page transition has completed causes the controls and looping behaviour of the carousel to be incorrect/inconsistent.

Steps to reproduce

  1. Visit http://angular-ui.github.io/bootstrap/ . The active slide is 0.

  2. Double click the carousel next control. The active slide is now 1 as expected.

  3. Click the previous control. The active slide now becomes 2, the carousel should actually transition to the previous slide instead of the next slide.

  4. Move the pointer away from the carousel (out). The carousel will move to the next slide, this is not expected.

Note: This also happens after quick swipe successions with touch enabled.

Link that reproduces the issue:

This is an issue on the current angular-ui bootstrap demo site:
http://angular-ui.github.io/bootstrap/

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.3

UIBS: 1.3.3

Bootstrap: 3.6.6

@icfantv
Copy link
Contributor

icfantv commented Jun 13, 2016

@Skawt2k we're working on removing replace: true from our code to make ng-class directives work (as well as resolve other issues). as such the code has changed. Can you please try building against master and test this again? Thanks.

@wesleycho
Copy link
Contributor

No need for that - this sounds like a potential issue with $animate not resolving correctly, it may be an Angular ngAnimate bug, but I need to investigate.

@icfantv
Copy link
Contributor

icfantv commented Jun 13, 2016

@wesleycho, ok, sounds good.

@stuartraines
Copy link

@wesleycho - Have you managed to investigate this issue at all? Is there a workaround that you know of?

@tariqporter
Copy link
Contributor

@stuartraines Yes, for now you can go to line approx 541 and comment out:

else if (nextSlide && nextSlide.slide.index !== currentIndex && $scope.$currentTransition) {
    bufferedTransitions.push(slides[nextIndex]);
}

@Skawt2k
Copy link
Author

Skawt2k commented Aug 22, 2016

@tariqporter - Many thanks for the workaround. I can confirm that commenting out the lines specified above resolves the issue. Thx.

@stuartraines
Copy link

@tariqporter - Thanks very much for taking the time to look into this and for the fix

@gameboy08
Copy link

gameboy08 commented Sep 20, 2016

@tariqporter - I have commented out that part, but the issue still happens, any other solution I can fix that?

@tariqporter
Copy link
Contributor

@kive323 For any version of angular-ui, this solution has worked for me. I assume that code is meant to be buffering clicks that are too quick. For my purposes, this is not needed, so removing buffering is fine. Test with a new version of angular-ui

@umeshdeveloper
Copy link

umeshdeveloper commented Dec 13, 2016

@tariqporter I tried your solution and its working fine, Thanks.

@tariqporter
Copy link
Contributor

I have created a pull request to properly fix this issue, and not use the hack I provided above

pull request #6367

@wesleycho wesleycho added this to the 2.5.0 milestone Jan 23, 2017
@swapnilbhalgat
Copy link

swapnilbhalgat commented Apr 24, 2017

I'm still facing this issue, when I click on next button multiple times and click on prev button and click back on next button, it goes to previous slide. Sometimes, when I keep clicking on next button it will go to prev slide. Can you please tell me if this issue is fixed or is there a workaround (without using the hack)?

@tariqporter
Copy link
Contributor

@swapnilbhalgat As far as I know, the last update that I pushed fixed this issue in 2.5.0. I haven't seen it since

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants