There are some times when you need to prevent the user from scrolling when a certain event occurs. An example could be when a modal is opened after clicking a button.
This is just some dummy text so you can scroll through the page.
It is as simple as copying the custom code and pasting it in the before </body> tag of your page/project.
After that, you just need to place the following custom attributes to your trigger elements:
Note: to add a custom attribute in Webflow, go to the Element Settings and in the custom attributes section add Name=scroll | Value=action with no quotes (" ").
It is recommended to set your modal container overflow property to auto in order to guarantee scrollability inside it when the content is larger than the viewport.
If you don't want to use attributes, you can modify the code to target classes or ID's.