Prevent Body Scrolling with React Modal (iOS)

802 Views Asked by At

There a lot of threads online about how to lock the body especially on iOS, but I haven't found a good answer.

body {
overflow: hidden;
}

Doesn't work on iOS.

My question is: how can I prevent Body Scrolling on iOS with react-modal?

Note: I found this package that it might work, but the problem is that I can't find a way to make it work with react-modal and hooks.

https://github.com/willmcpo/body-scroll-lock

Any help?

0

There are 0 best solutions below