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 when using jquery.Waypoints #304
Comments
Actually, the problem appears to be wider than just the plugin, and extends to general use of jquery.scroll() event, which this plugin also uses. I have other code relying on the jquery scroll() event handler, and it doesn't function when overlayscrollbars is active. |
Good day @c9mbundy! Please create a minimal example on JSFiddle, CodeSandbox or StackBlitz. I really appreciate your detailed description, but without a example its very hard to figure out the problem. |
Ok, I'll try to find some time to do that, and see if I can repro in a simple example. As you might imagine, my working application is quite complex, but the gist of the problem is that scroll events are not making it past overlayScrollbars for reasons I don't understand (likely stupidity on my part).
No console output from But if I comment it out...
Then I get output from $(window).scroll() and everything starts working again. |
@c9mbundy that happens because OverlayScrollbars is generating its own DOM, and therefore the scroll event isn't actually happening anymore directly on the |
I see - I seem to recall that scroll events don't bubble-up - so I assume that's why the document and window scroll events don't fire, as scrolling the entire page seems to be a special case that fires those. |
@c9mbundy yes, thats usually how such libraries work. Sometimes they provide a option where you can specify the I've created a small example for you: https://jsfiddle.net/4akzm0fc/ maybe this helps :) |
Sorry for the delayed reply - I've been tied up on a project - rent to pay and all that, Changes to Waypoints are helpful, thanks, but unfortunately doesn't address the primary issue of not being able to rely on Window/Document scroll events when OverlayScrollbars is applied to the body. I have existing code depending on Window/Document scroll events when the body scrolls, and I'm not sure how to work around that with this version. |
@c9mbundy Unfortunately you'll need to wait until the release of |
|
I have a site that uses jquery.Waypoints to initiate animation when page elements scroll into the viewport.
When I add OverlayScrollbars to the body element (on dom load) this appears to interfere/block the scroll-events triggering the waypoint activation - and so no animations are shown.
If I disable OverlayScrollbars, then jquery.Waypoints behaves as expected, and the page animations are activated when the elements scroll into view.
The text was updated successfully, but these errors were encountered: