By default, when you open a pop-up or menu and start scrolling, the main content will scroll too. You can’t fix that with native Webflow features, but it’s not a big deal to add a short script to prevent this:
// Prevent scrolling on click
$('.menu-btn').click(function (e) {
e.preventDefault();
$('body').css('overflow', 'hidden');
});
/* Allow back page scrolling by clicking on the element with the necessary class name.
If you have several close elements with the same action like a close button and cancel button, write classes by a comma. */
$('.close-menu-btn, .menu-wrap').click(function (e) {
e.preventDefault();
$('body').css('overflow', 'auto');
});
See how this script works—all interactions except the script were made with Webflow built-in interactions 1.0.