React-native-swiper: iOS stuck when quick scrolling with loop enabled

Created on 23 Sep 2016  ·  12Comments  ·  Source: leecade/react-native-swiper

The 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?

Most helpful comment

Hi @leecade

it is also stuck when i swipe fast in 1.5.1

All 12 comments

Hi @ox-michaelradionov

try the new version (1.5.0), then give the feedback here, thanks

Hi @leecade

it is also stuck when i swipe fast in 1.5.1

I meet the same issue

+1 same issue, but 1.5.2 works better (still stuck but the next swipe will work)

1.5.2 still stuck when swipe fast

@onlyoneonly How to reproduce? just press the next button or swipe?

I thought 1.5.2 fixed this

when swipe to one direction very very fast still stuck but the next swipe will work,and the pagination dot becomes nonresponsive

The same behavior.

@onlyoneonly the same issue. l need to reverse the direction to make it work.

+1

It also happens on Android. Any update on this?

it also happens on iOS,swiper version is 1.5.6,hope to fix it,thanks.

Was this page helpful?
0 / 5 - 0 ratings