justin-chu / react-fast-marquee

A lightweight React component that harnesses the power of CSS animations to create silky smooth marquees.
https://react-fast-marquee.com
MIT License
1.24k stars 101 forks source link

autoFill true causing whole website stuck #66

Open himanshusatija-cred opened 1 year ago

himanshusatija-cred commented 1 year ago

If I'm using autoFill true, it's making whole website unresponsive.

nathanielCherian commented 1 year ago

Ran into this same issue, I believe it can be fixed if you wrap the Marquee in a div and bound its width to say 500px. The website crashes because it keeps on spawning more elements to fill the page.

mezotv commented 1 year ago

Ran into this same issue, I believe it can be fixed if you wrap the Marquee in a div and bound its width to say 500px. The website crashes because it keeps on spawning more elements to fill the page.

Tried this and it still errors our a lot and crashes the site? Do you think @justin-chu will fix this?

oguzhantufenk commented 1 year ago

Same issue here. Fixed it by giving static width to it.

lnicepei commented 1 year ago

Had same issue, solved by @nathanielCherian's answer

6lyxt commented 7 months ago

i will bump this

BanShan-Alec commented 4 months ago

Same issus,I hope the author can fix it or give tips in the documentation.

ahbyass commented 1 week ago

Wrapping the <Marque /> in a grid with 1 column of 1fr width resolves the issue.

mezotv commented 1 week ago

Wrapping the <Marque /> in a grid with 1 column of 1fr width resolves the issue.

Seems like some hacky solution instead of actually fixing the issue.

ahbyass commented 1 week ago

Wrapping the <Marque /> in a grid with 1 column of 1fr width resolves the issue.

Seems like some hacky solution instead of actually fixing the issue.

Agreed, but not my project, I passed along as a more flexible hack as you don't need to have it as a fixed width. There is a similar issue with Swiper.js, where width gets calculated to Infinity without fixed parent widths with different behaviours for flex and grid parents and the units used to define parent column width eg fr or % . Given the extensive discussion of this issue on swiper and the the agreed fix for that is this suggested hack, it may likely be the fix that is need internally with this project.