Swiper: Swiper does not call slideChange when slidesPerView: 'auto'

Created on 5 Nov 2018  路  9Comments  路  Source: nolimits4web/swiper

This is a (multiple allowed):

  • [x] bug
  • [ ] enhancement
  • [ ] feature-discussion (RFC)
  • Swiper Version: 4.4.2.
  • Platform/Target and Browser Versions: Ubuntu 18.04; Chrome 70.0.3538.77 (Official Build) (64-bit).
  • Live Link or JSFiddle/Codepen or website with isssue: DEMO.

What you did

Just try to swipe slides and you will see that slideChange event is not triggered. Using this event I want to get realIndex. Just want to draw your attention that there are 3 slides but just 2 nav bullets (in my case I do not care what realIndex can be, because I can simply do +-1, but what I really need is a workable slideChange event).

Expected Behavior

Swiping of slides should trigger slideChange event in order to let me get realIndex.

Actual Behavior

Swiping of slides does not trigger slideChange event.

probably bug

Most helpful comment

In my case, I also use slidesPerView: 'auto' and I get the slideChange, slideChangeTransitionStart, and slideChangeTransitionEnd events except when going to the last slide. When I comment out the slidesPerView option (leaving it to the default value), all those events are triggered correctly for all slides.

All 9 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

In my case, I also use slidesPerView: 'auto' and I get the slideChange, slideChangeTransitionStart, and slideChangeTransitionEnd events except when going to the last slide. When I comment out the slidesPerView option (leaving it to the default value), all those events are triggered correctly for all slides.

Experiencing the same issue as @alejandroiglesias. When slidesPerView: 'auto' is set, no callbacks for the last slide is fired. Edit: setting centeredSlides: true seems to also fix the issue, but is far from ideal, as my design requires the slides to be left-aligned.

Please take a look #3108 to see whether it can solve your problems.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I am experiencing the same issue and centeredSlides: true, though it fixes it, is not an option for me because I also need the slides to be left aligned. Did anybody find a solution? :pray:

still issue

Is it possibly to add a param(such as slideFollowPagination)?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aeblin picture aeblin  路  3Comments

callumacrae picture callumacrae  路  3Comments

magic-77 picture magic-77  路  3Comments

TomDeSmet picture TomDeSmet  路  3Comments

lxmarinkovic picture lxmarinkovic  路  4Comments