Preventing scroll when a pop-up is opened

Preventing scroll when a pop-up is opened

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:

[code https://github.com/dumkaio/blog/blob/master/preventing_scroll_when_a_pop-up_is_opened/code.js]

See how this script works—all interactions except the script were made with Webflow built-in interactions 1.0.

It might be interesting for you

Let’s create together

Start a project

Let’s create together

What are your interested in?

Budget

Timeframe

Personal details

Thank you for getting in touch!
We appreciate you contacting us.
We will get back to you shortly.
Dumka
Something went wrong while submitting the form.
Close