Make page stop scrolling when lightbox is active

Hey!

When my lightbox window pops up, it’s hard to scroll just the lightbox content without also scrolling the content behind the popup. Is there any code I can freeze the body content but still allow the content in the lightbox to scroll? Thanks!

I seem to remember someone saying it’s because lightboxes aren’t designed to be scrolled, more for single screen content which I understand but its pretty limited (this was back in the Editor X days so maybe someone has a better answer for you now hopefully!)

I never bothered continuing with what I wanted to do with lightboxes for this reason but if you don’t find a way to to freeze the page beneath a less elegant thing to try in the meantime could be to make the page scroll when you close the lightbox? So either scroll to the top of the page or to the thing the user clicked to open the lightbox if needed? Wouldn’t be the best solution but something you could try if no better ideas come in and at least the user will be back to where they roughly need to be!