question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When swiping through slides quickly carousel returns to item at first index

See original GitHub issue

I ran into an issue, where if I swipe (left) at a high speed through a few full screen slides then instead of staying on the slide I stopped sliding on, it instead returns to the first slide.

In the attached gif I am sliding my finger to the left for several slides, and then when I let go, the carousel seems to be swiping right on its own. Any ideas?

In some cases, while swiping left, the carousel also tries to “fight” me and swipe in the opposite direction. ezgif-1-ed11ae3bd5

Carousel Component Set up

            <Carousel
              ref={c => { this.carousel = c; }}
              data={this.props.moments}
              renderItem={this.renderItem}
              sliderWidth={width}
              itemWidth={width}
              containerCustomStyle={{ flex: 1 }}
              inactiveSlideScale={1}
              inactiveSlideOpacity={1}
              scrollEndDragDebounceValue={0}
              decelerationRate='fast'
              disableVirtualization={false}
              firstItem={this.props.activeIndex}
              onSnapToItem={(slideIndex) => {
                this.props.didSwipeMoment(slideIndex);
              }}
            />

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bd-arccommented, Sep 3, 2017

Hi @gonzalezchris,

Since the plugin hasn’t been designed with fullscreen slides in mind, some fine-tuning may be needed 😉

One question thought: have you tried your app in production mode? Android performance is just horrendous in debug mode (see the “Known issues” section of the doc).

0reactions
gonzalezchriscommented, Sep 25, 2017

@bd-arc I apologize for the delayed response, this fixed the issue, thanks a bunch!

Read more comments on GitHub >

github_iconTop Results From Across the Web

When swiping through slides quickly carousel returns to item ...
I ran into an issue, where if I swipe (left) at a high speed through a few full screen slides then instead of...
Read more >
Carousel slides incorrectly when swiping or when clicking the ...
Okay, my first answer here was done in a hurry but I believe I have a ... _next = function() { // Index...
Read more >
Best practices for carousels - web.dev
A carousel is a UX component that displays content in slideshow-like manner. Carousels can "autoplay" or be navigated manually by users.
Read more >
Carousel - Bootstrap
The carousel is a slideshow for cycling through a series of content, built with CSS 3D transforms and a bit of JavaScript. It...
Read more >
Carousel · Boosted v5.2
The carousel is a slideshow for cycling through a series of content, ... your slides easily with the .carousel-caption element within any .carousel-item...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found