-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Reveal only works on resize? #298
Comments
In case anyone is curious... it was an issue with |
Yup I had the same issue, with this overflow-x at the html, body level @jlmakes any idea why scrollreveals stop working when this overflow-x is set to hidden ? |
@edoardoVD If you can recreate this problem using JSBin (or similar), I will spend some time debugging it. Please be sure to specify what operating system, browser version and library version you are using. |
@jlmakes thanks for the offer in looking into this Two very basic pure JS samples: This one does NOT behave as expected: http://js.do/code/jsrtest Also I'm using:
I guess it has to do on how things are rendered, or timing on when ScrollReveal executes code to start getting its container, positions, etc... |
@edoardoVD You need You can inspect your first demo, and see the body is almost 4000px tall. This causes everything to be "visible" (relative to the container) on page load, causing this issue where elements are revealed before they are scrolled to. |
@jlmakes thanks so much for troubleshooting this so fast, I'll look into more detail on my Angular 2 project, and see what might be causing a body height resize or other manipulation while rendering the view, while that specific CSS property is set ( Thank you for your time! Just as a comment reference this is the behavior: |
@edoardoVD I’m actually not sure what scenarios would conflict with |
@jlmakes Getting this same bug on the last section of my page. Only shows on window resize. Here is the site for reference: |
@dbarrett24 ScrollReveal captures element sizes when initialized, and on resize. That means when you are first calling I would try deferring when you first call ScrollReveal... or if you don't mind using currently undocumented API, you can call Either way, ScrollReveal should do what you expect once it has an accurate cache of element sizes. |
@jlmakes This bug is still happening, it only works when you resize the viewport, add this after the ScrollReveal() class instance. setTimeout(() => ScrollReveal().delegate(), 100); |
I have the animation applied to one item as of now. It won't work on scroll... only if I resize the browser to make it taller? I'm sure it's something simple, but can't seem to track it down. I've also tried to remove all other scripts to check for a conflict, but that didn't help either.
The text was updated successfully, but these errors were encountered: