iOS stuck when quick scrolling with loop enabled
See original GitHub issueThe issue is only for iOS, Android works fine. I was able to reproduce it both on real device and in simulator.
I have Swiper with four slides and loop option set to true
. When I swipe to one direction very fast, pretty soon the whole slider is stuck and I am no longer able to swipe to that same direction. I can swipe in the opposite direction though, if I do it once (swipe back one slide), then it “unstucks” and I can swipe in the original direction again.
From my research it stops on the last slide if I quickly swipe to the left, or on the first slide if I quickly swipe to the right.
The problem is that onMomentumScrollEnd
is only fired when the animation ends, but when I swipe quickly (I start new swipe action in the middle of previous animation) animation never ends and callback never fires. It leads to the situation when offset keep growing, a queue of looped slides is never updated and I am able to get to the “end” of the slides even though it is a looped mode. I guess that’s why it only stops on the first or the last slide.
Maybe it is possible to somehow update the state mid-air without waiting for animation to end and without actually interrupting active animation with any visible lags?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (2 by maintainers)
Top GitHub Comments
Hi @leecade
it is also stuck when i swipe fast in 1.5.1
when swipe to one direction very very fast still stuck but the next swipe will work,and the pagination dot becomes nonresponsive