Czytasz kopię artykułu dostępnego tylko w wersji angielskiej. Pełna wersja: Open source JS plugin for blocking scroll on body.
Have you ever been so annoyed with browser behaviour that you decided to write a quick JS plugin? That is what has happened to me recently.
Mobile webkit browsers don't care at all if your
body is on
overflow: hidden;. They let you scroll regardless.
I was working on some pretty advanced overlays and this behaviour was pissing me off so much that I decided to write the
Body no-scroll open source plugin (MIT License). You can get it on GitHub.
This plugin blocks the hell out of the
body and doesn't let the browser scroll it. You can now place your modals and overlays however you want.
It has been tested on most of the browsers, but not all of them. So if you happen to have a device with browser I haven't mentioned on GitHub just let me know how the plugin behaves.
For more information visit the GitHub project repository.