Lock Body Scroll (iOS Included)
![site profile thumbnail](https://screenshots.webflow.com/sites/5b889b26b9decae88354290f/20180831063344_07ae974f953ffc3b79b87078d3e0d4c6.png)
A valuable utility for the Webflow community:
Enables body scroll locking (for iOS Mobile and Tablet, Android, desktop Safari/Chrome/Firefox) without breaking scrolling of a target element (eg. modal/lightbox/flyouts/nav-menus).
Features:
- Disables body scroll WITHOUT disabling scroll of a target element
- Works on iOS mobile/tablet (!!)
- Works on Android
- Works on Safari desktop
- Works on Chrome/Firefox
The Custom Code is 2 Parts:
1. Desktop solution, courtesy of @Sabanna
2. Mobile touch + iOS solution, courtesy of Bohdan Didukh