Preventing body scroll for modals in iOS – Ben Frain

PHOTO EMBED

Tue Apr 26 2022 16:40:12 GMT+0000 (UTC)

Saved by @Chavrou #css

.bg-scrolling-element-when-modal-active {
    /* when modal active */
    touch-action: none;
    -webkit-overflow-scrolling: none;
    overflow: hidden;
    /* Other browsers */
    overscroll-behavior: none;
}
content_copyCOPY

https://benfrain.com/preventing-body-scroll-for-modals-in-ios/