You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently can't seem to change the scroll wrapper in Locomotive Scroll v5. I need to use a custom div (with id "global-scroll") as the website's scroll wrapper instead of the window. This limitation prevents me from implementing a specific layout structure that requires a custom scroll container.
Like this:
const scroll = new LocomotiveScroll({ wrapper: document.getElementById('global-scroll'), // other options... });
The text was updated successfully, but these errors were encountered:
I had the same issue, when I passed a custom wrapper and content in the lenisOptions while instantiating it was getting overridden to wrapper: window and content: document.documentElement.
Looked into the code, and there's an issue in the _init() method which creates an instance of Lenis.
Here the way wrapper and content are written, it is always overriding the once passed in lenisOptions while instantiating.
It should have been done in the following manner so that it honors the wrapper and content passed while instantiating and uses window and document.documentElement as default values.
I currently can't seem to change the scroll wrapper in Locomotive Scroll v5. I need to use a custom div (with id "global-scroll") as the website's scroll wrapper instead of the window. This limitation prevents me from implementing a specific layout structure that requires a custom scroll container.
Like this:
const scroll = new LocomotiveScroll({ wrapper: document.getElementById('global-scroll'), // other options... });
The text was updated successfully, but these errors were encountered: