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

How to Disable Scrolling When Menu is Active #574

Open
Nafiz-Ahmed opened this issue Jan 31, 2025 · 0 comments
Open

How to Disable Scrolling When Menu is Active #574

Nafiz-Ahmed opened this issue Jan 31, 2025 · 0 comments

Comments

@Nafiz-Ahmed
Copy link

Hello!

I'm working with Locomotive Scroll beta for my project of next js, and I need to disable the page scroll when the navigation menu is on. However, I have faced limitations while implementing these. I have tried different ways of going about this, such as manipulating the overflow of the body or trying to manage the scroll behaviors of Locomotive Scroll. However, none of them have helped me out.

The main issue is, when the menu is opened, I would like to have native scrolling and the custom scroll behavior of Locomotive Scroll disabled; when the menu is closed, I would like scrolling to be enabled again and Locomotive Scroll to start its smooth scrolling.

I've tried using stop() and start() methods on Locomotive Scroll to control this, but I still can't get the behavior I want.

Is there something I missed? Which method should I be using or configuring in order to control the scrolling better with Locomotive Scroll when the menu is open?

I appreciate any suggestions!

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

1 participant