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

Issue with translateZ(0) on page load #28

Open
pedromagalhaes opened this issue Mar 28, 2018 · 4 comments
Open

Issue with translateZ(0) on page load #28

pedromagalhaes opened this issue Mar 28, 2018 · 4 comments

Comments

@pedromagalhaes
Copy link

Hi, im not sure you are having this issue as well.

But on page load in latest version of Google Chrome, the sticky plugin is wrapping the element with a translateZ(0) CSS style, which makes the element to be invisible.

However, when I scroll down and the sticky occurs, the translateZ(0) CSS style is removed so the element is visible again.

Any configuration that makes this working properly?

Thank you

@joafeldmann
Copy link

having the same problem. did you find a solution?

@kyle-mccarthy
Copy link

I realize this issue is really old, but it looks like this can be controlled by the isIOSFixEnabled prop. This code seems to be responsible for adding the translateZ(0).

The reasoning for this is outlined in the comment:

To ensure that this component becomes sticky immediately on mobile devices instead of disappearing until the scroll event completes, we add transform: translateZ(0) to 'kick' rendering of this element to the GPU

So passing false for isIOSFixEnabled should resolve the issue.

@AmrHalim
Copy link

@kyle-mccarthy Unfortunately isIOSFixEnabled doesn't seem to be a valid property when I use the package in TS.

@gm0t thanks for the awesome package! However, this is a serious issue and it would really be great if you can either add a fix for it or give us a work around that we can use until it gets fixed.

Thanks.

@gm0t
Copy link
Owner

gm0t commented Jun 26, 2023

Hey @AmrHalim , could you please try [email protected] version?
I've migrated the library to TS, so isIOSFixEnabled should be available for you now

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

5 participants