lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.14k stars 1.77k forks source link

overflow hidden on body not working #656

Closed sorenwagemans closed 5 years ago

sorenwagemans commented 5 years ago

overflow hidden on body not working

I downloaded your latest version of lightbox 2, but it seems that when I use it, it's still possible to scroll on the body of the page when the lightbox is opened. I saw that this error was also in your demo examples. => https://lokeshdhakar.com/projects/lightbox2/#examples

When I look in the code, I see that the body is not affected after opening the lightbox. afbeelding

Any possible fixes for this problem?

lokesh commented 5 years ago

@sorenwagemans did you turn on the disableScrolling option? By default it is set to false. https://lokeshdhakar.com/projects/lightbox2/#options

sorenwagemans commented 5 years ago

Ow yea, I see, did it change over the years? Because I can't remember having to change it when I first used it. Sorry for the trouble and thank you for the solution.

lokesh commented 5 years ago

np! I'm going to close. I think this was reopened on accident. But if there is any other issues let me know.