Disable background scrolling when modal is on

Hello!

Apparently when I reach the bottom of the modal the background starts to scroll.

I know it’s not possible to prevent it in Webflow and I need a custom code in order to do it.

Can anyone please let me know what’s the best script/code to use and where to put it.

I’ve tried many but I still have the same problem.

Thank you !!
G


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Thank you I tried it and finally it’s working.

1 Like

Hi, thanks for raising this question! Which is quite common…

For me, the script works at first but after any click within the modal it returns to scrolling behaviour. It seems to auto turn off or something. Anyone else have that problem?