When swiping multiple times quickly (before the previous swipe has finished) onSlideChangeEnd isn't called
Edit: missing word
And will not, because there is no transitionEnd event, because you interrupt transition with swipe/touch. I will think about adding workaround for that, but now you may use/change your logic to onSlideChangeStart
Cool thanks.
same problem as Willcalderbank.
@nolimits4web Are you considering changes/workarounds for this issue other than changing logic to onSlideChangeStart? I'm running into this as well and the recommended workaround may lead to less fluent animations on some devices.
@nolimits4web - any updates here? We're going to try and come up with a fix on our end, but was curious if this has been reopened anywhere else?
Same problem here. Tried to work with onSlideChangeStart but adding/removing (lazy loading) just before showing the following slide didn't prove to be a great idea.
In my case I work with a buffer of 7 slides and keep adding/removing slides in both ends.
Indexes get totally messed up.
Has anyone figured out a fix they can share?
What works for me is:
onSlideNextEnd() {
this.swiper.enableTouchControl()
},
onSlidePrevEnd() {
this.swiper.enableTouchControl()
},
onTransitionEnd() {
this.swiper.enableTouchControl()
},
onTouchEnd() {
this.swiper.disableTouchControl()
},
onSlideChangeEnd() {
this.swiper.enableTouchControl()
},
onSlideChangeStart() {
this.swiper.disableTouchControl()
},
It "disables" fast scrolling and forces transition to end every time.
@JanMesaric
Sir, you have suggested the correct way to handle too fast swipes. I have implemented in the following way in the ionic where I didn't have enableTouchControl() and disableTouchControl() method due to older versions:-
javascript
onSlideChangeStart(slider) {
slider.params.onlyExternal = true
},
onSlideChangeEnd(slider) {
slider.params.onlyExternal = false
}
where slider is a synonym for swiper
Again, Thanks for commenting @JanMesaric
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
What works for me is:
It "disables" fast scrolling and forces transition to end every time.