Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infiniteLoop is broken since 3.2.22 #674

Open
shwao opened this issue Feb 11, 2022 · 16 comments
Open

infiniteLoop is broken since 3.2.22 #674

shwao opened this issue Feb 11, 2022 · 16 comments

Comments

@shwao
Copy link

shwao commented Feb 11, 2022

Describe the bug
The infiniteLoop option does not work anymore with version 3.2.22. The carousel does not go in a loop but jumps from the end to the start or from start to end.

To Reproduce
Install version 3.2.22 and create a carousel with at least 2 slides. Go to the last slide and then one more. It should go the first slide in a loop but instead it jumps back to the first slide.

Expected behavior
It should go in a loop.

Additional context
The infiniteLoop option works as expected with 3.2.21. Installing this exact version "fixes" it. The weird thing is that if you install the newest version and then comment out the only change made to the code (8cc7480) it does not fix the problem. So this change does not seem to cause the bug. Maybe the build process changed and the bug was introduced there?

Video from the storybook
You can see the bug in the storybook demo. As you can see the infiniteLoop option is enabled but it just jumps back. I would like to show the difference to the previous version but i don't know if thats possible in storybooks.

Screen.Recording.2022-02-11.at.15.17.39.mov

I would help
I would like to contribute but i don't know what else could be the problem to this instead of the only change made to the code and I don't know about your build process. Maybe you find the problem or can give me more info where to look.

@SachinCoder1
Copy link

Hi, is this issue resolved? if not i would like to work on this.

@krunal81093
Copy link

Hi, is this issue resolved? if not i would like to work on this.

The issue is not resolved.

@michael-harley
Copy link

Thanks for sharing this issue! For now, I'll revert to 3.2.21 👍

@Longshoez
Copy link

It works now! but somehow it breaks the styling of the container, i have a popup with the carousel component set to 60vw and when i apply infiniteLoop the component stretches to like 90vw and the content of the carousel gets shifted to the left while overflowing from the slide container.

@thomcrielaard
Copy link

It works now! but somehow it breaks the styling of the container, i have a popup with the carousel component set to 60vw and when i apply infiniteLoop the component stretches to like 90vw and the content of the carousel gets shifted to the left while overflowing from the slide container.

Yep same here. Would be neat if a fix could be implemented

@utkarsh621x
Copy link

same issue i am facing reverted back to version 3.2.21 and now its working fine

@thomcrielaard
Copy link

same issue i am facing reverted back to version 3.2.21 and now its working fine

Good suggestion, I'll try that soon!!

@buhbuhtig
Copy link

I would help I would like to contribute but i don't know what else could be the problem to this instead of the only change made to the code and I don't know about your build process. Maybe you find the problem or can give me more info where to look.

I discovered the following: version 3.2.21 (npm install react-responsive-carousel@3.2.21 vs npm install react-responsive-carousel@3.2.22) has no file react-responsive-carousel\lib\js\components\Carousel.js , if you copy the file from version 3.2.21 to 3.2.22, the infinite loop starts working correctly.

@buhbuhtig
Copy link

buhbuhtig commented Mar 20, 2023

New update investigation. Found out (I may be wrong in details, but the general picture is clear) that there was split refactoring (Carousel.tsx -> index.tsx,animation.ts,...) after 3.2.15, where infiniteloop already stopped working. But. No one noticed this, because the new files were "covered" by the old ( repo: https://www.npmjs.com/package/react-responsive-carousel?activeTab=versions ), not deleted, obsolete working code (the original Carousel.js, Carousel.tsx files were not deleted).
In installation 3.2.22, the Carousel.js file was removed because in theory it was not needed, and we started using new but glitchy (infiniteloop does not work) code.

@sooraj888
Copy link

"react-responsive-carousel": "^3.2.10"
this version works properly with infinite loop

@dancherb
Copy link

Thanks for looking into it, are there any updates here? @buhbuhtig

I found 3.2.10 had some weirdnesses compared to the latest version so I'm reluctant to bump it back, would be great if a fix came through.

@PietroAimone
Copy link

Bump, still broken.

@SomeBrujah
Copy link

Did anyone resolve this bug?

@Rhinophrynusdorsalis
Copy link

No, still broken. Would be great to get a fix.

@TuleSimon
Copy link

any fix on this?

@yuseinkerdakov
Copy link

any fix on this?

@TuleSimon pin the react-responsive-carousel's version to 3.2.21. In this version the loop is still not broken.

StormyMeadowlark added a commit to StormyMeadowlark/HEM that referenced this issue Apr 22, 2024
sel for the images to cycle in the infinite loop
like intended
leandrowd/react-responsive-carousel#674
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests