Skip to content
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

Should not be able to slide beyond last slide #1409

Closed
henrysxie opened this issue May 15, 2014 · 7 comments
Closed

Should not be able to slide beyond last slide #1409

henrysxie opened this issue May 15, 2014 · 7 comments

Comments

@henrysxie
Copy link

In v1.0.0-beta.5b 'barium-bobcat', I think there is a bug where I'm able to slide beyond the last slide, at which point I'm unable to slide back.

I'm using ng-repeat with an array variable that is resolved via ng-resource. After it's resolved, I call $ionicSlideBoxDelegate.update();

This was also broken for me in the earlier build, Nightly 2081.

@henrysxie
Copy link
Author

I think I found the issue:

var isPastBounds =
      !index && delta.x > 0 |                    // if first slide and slide amt is greater than 0
      index == slides.length - 1 && delta.x < 0; // or if last slide and slide amt is less than 0

Note that there is a missing | in the OR logic. This is lines 7106-7108 in ionic.js, in beta.5b.

@ashconnell
Copy link

Just thought I would point out I am having the same issue in beta 5b, which wasn't happening in beta 4.

With a basic ion-slide-box and a few ion-slide's hard coded, i am able to swipe back from the first slide (swipe as far as you can from left to right) and let go. A blank slide comes into place and the pager thinks its on the last slide. From then on, all sorts of crazy things happen and it really has no idea which slide it is on, and which slide to display.

I don't currently have time to debug and find out why, but have added to my list of things to look into in the near future if the issues persists.

@ajoslin
Copy link
Contributor

ajoslin commented May 18, 2014

Will fix Monday, thanks.

This was a dumb mistake due to me fixing a JSHint error and making a typo.

And unfortunately, ionSlideBox is one of our 'legacy code' components. It's very untestable and has no unit tests.

We will amending this problem soon.

@ajoslin
Copy link
Contributor

ajoslin commented May 19, 2014

Fixed via ec5a276, can you test out the nightly build in your app and let me know?

@ajoslin ajoslin closed this as completed May 19, 2014
@fengshuo
Copy link

I am using the v1.0.0-beta.6-nightly-2269 version, still having the bug as Deminetix described.

@fengshuo
Copy link

turns out I need to update the whole lib folder with beta.6 to make it work. (I was just updating the js file before)

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants