willmcpo / body-scroll-lock

Body scroll locking that just works with everything 😏
MIT License
4.04k stars 337 forks source link

reserveScrollBarGap overwrites body styles #146

Closed AndreiEres closed 3 years ago

AndreiEres commented 4 years ago

reserveScrollBarGap doesn't work for body with paddings: body { padding: 30px}, because after scroll disabling body needs paddingRight: getComputedStyle(document.body).getPropertyValue('padding-right') + scrollBarGap.

AndreiEres commented 4 years ago

Maybe it should help https://github.com/willmcpo/body-scroll-lock/pull/147

diachedelic commented 3 years ago

Fixed in #147