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

When reload the page react-fast-marquee is accelarating #9

Closed
efemevlut opened this issue Jun 11, 2021 · 7 comments
Closed

When reload the page react-fast-marquee is accelarating #9

efemevlut opened this issue Jun 11, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@efemevlut
Copy link

efemevlut commented Jun 11, 2021

I am using png file and When reload the page react-fast-marquee is accelarating.
My code snippet
<Marquee speed={100}> <div className={"marquee-style"}> <img src="/example1.png" width="50%"/> </div> <div className={"marquee-style"}> <img src="/example2.png" width="50%"/> </div> <div className={"marquee-style"}> <img src="/example3.png" width="50%"/> </div> </Marquee>

@justin-chu
Copy link
Owner

I'll look into this.

@justin-chu
Copy link
Owner

Unfortunately, I'm unable to reproduce this issue. Do you have more details? It could be an issue with the marquee-style class, but I'm not sure.

@justin-chu justin-chu self-assigned this Jun 20, 2021
@justin-chu justin-chu added the bug Something isn't working label Jun 20, 2021
@kasyava
Copy link

kasyava commented Oct 26, 2021

I have a similar situation. When the page loads, react-fast-marquee sets the fast scrolling speed. The set speed is restored only when switching to another page and then back to the main page. I have react-fast-marquee only showing on the main page. react-fast-marquee version 1.2.1

An example of my code

<Marquee style={{backgroundColor: "#343a40"}}
                 gradient={false}
                 speed={50}
                 pauseOnClick={true}
        >
            {winingList.map((item, index) => {
                return (
                    <React.Suspense key={index} fallback={<Placeholder/>}>
                        <LastWinsItem  {...item}/>
                    </React.Suspense>
                )
            })}
</Marquee>

but if I don't use React.lazy and React.Suspense then everything works as it should

@gustavoferrara
Copy link

Any updates on this? Experiencing the same issue.

@codyarose
Copy link

Same issue here.
Also using Suspense, and I noticed that the issues resolves itself if the viewport size is changed.

The speed is controlled by a css variable on .marquee called --duration. My temporary fix is to manually override that variable --duration: 60s !important

@kylewetton
Copy link

Until this is fixed, the lib isn't worth using unfortunately.

@justin-chu
Copy link
Owner

Fixed in 1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants