g787543 / infinite-react-carousel

Infinite carousel for react
https://g787543.github.io/infinite-react-carousel/
MIT License
110 stars 34 forks source link

autoplay seems to be stopped at some point #6

Closed ferrarisMat closed 4 years ago

ferrarisMat commented 4 years ago

First of all, thanks for this lib ! you did an awesome job :)

Describe the bug I'm using your lib just to have an infinite autoplay slider. The timer seems to be frozen sometimes at first app render (I have to refresh to make it start). I have the same issue when I switch on another tab, it freezes where it was just before (I usually see the end of the scroll animation and then never switch to the next slide). I set up a srcollSpeed to 8000

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://storybook-95-stoomlink-smartdisplays-frontend.nextmoov-ops.now.sh/?path=/story/disturbscreen--default'
  2. Maybe It will work at first render, maybe not.
  3. Try to switch to another tab and then come back to that one

Expected behavior It should just start and never stops while the app is running, maybe it can restart to the first slide when you switch on another browser tab.

Desktop (please complete the following information):

NOTE: This is still a WIP, and custom styled

g787543 commented 4 years ago

Hi, @ferrarisMat

Thank you. I am pleased you like it and please give me more time to fix this problem.

g787543 commented 4 years ago

Hi, @ferrarisMat

Did you set pauseOnHover to false? if not, autoplay may stop when mouse hover on carousel

ferrarisMat commented 4 years ago

Thanks @g787543 ! I tried to set pauseOnHover={false} it seems to be less buggy when I switch tabs, but unfortunately I still have some issues at first render.

g787543 commented 4 years ago

Hi, @ferrarisMat

I already pushed the new version on npm, please try again, thank you.

ferrarisMat commented 4 years ago

Hi, @ferrarisMat

I already pushed the new version on npm, please try again, thank you.

Wow ! that was fast, thank you ! I just tested and I works as expected now ✌🏻