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

Does not work at all?! _SS_wrapper does not update #5

Closed
nicmare opened this issue Dec 9, 2022 · 1 comment
Closed

Does not work at all?! _SS_wrapper does not update #5

nicmare opened this issue Dec 9, 2022 · 1 comment
Labels
good first issue Good for newcomers

Comments

@nicmare
Copy link

nicmare commented Dec 9, 2022

I am struggling for hours now and even copied your code. I can see in my source code that _SS_wrapper and _SS_dummy is present in DOM but if i scroll, they inline css value do no update. What do i miss?!
"z-index: 1; height: 100%; width: 100%; overflow: visible; top: 0px; left: 0px; position: sticky; transform: translate3d(0px, 0px, 0px);"

@Musab-Hassan
Copy link
Owner

Musab-Hassan commented Jan 26, 2023

Sorry for the late reply, been away from work. The example works on the body, not the window. Ensure your not scrolling in the window with your body as the overflowed content. Window scrolls cannot be modified, that's usually how most websites scroll, the content overflows the window. To scroll on body or any other element, ensure that element itself is the scroll frame and content overflows it. For example to add momentum scrolling to the body, you would have to make it a scroll frame.

Example: a body scroll frame (will scroll when content inside is longer than 100vh/100vw)

body {
  overflow: auto;
  height: 100vh;
  width: 100vw;
}

Example: a test div scroll frame with content that overflows it (will scroll when content inside is longer than 100px/100px)

.test {
  display: block;
  overflow: auto;
  height: 100px;
  width: 100px;
}

@Musab-Hassan Musab-Hassan added the good first issue Good for newcomers label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants