Skip to content

Slides : drag trigger ionSlideDidChange incorrectly #10208

@TomDemulierChevret

Description

@TomDemulierChevret

Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
If the user drag to get the next slide the event ionSlideDidChange is always triggered even if there isn't any next slide.
The current activeIndex of the slider is also increased even if the slide displayed is still the same (since there isn't any next slide).

Expected behavior:
The event should be triggered only if the slide actually changed.
The activeIndex should change only if the slide actually changed.

Steps to reproduce:
Here is a plunker that shows the issue : http://plnkr.co/edit/UFVQniL4Uf9LZ0jukXW3?p=preview

Related code:
See the plunker above.

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v6.9.2
Xcode version: Not installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions