Open zslabs opened 4 years ago
I'm running into this issue as well with a mobile navigation. The body locks correctly while the menu is open, but I'm unable to scroll the overflow content inside of the overlay.
I was facing the same issue I ended up using https://www.npmjs.com/package/body-scroll-lock
Thanks for the tip @bjonamu that's working great!
Same question here. I assumed the hook and the package linked here did the same thing, but apparently not.
Hi, Could I some clarification on https://github.com/streamich/react-use/blob/master/docs/useLockBodyScroll.md and its intent? The description mentions locking down the
body
element, but what I'm looking for it to do would be for locking the "background"body
element, while preserving scrolling within things like a modal or offcanvas menu. Right now, when using this as part of https://github.com/gremlin/chaoskit/blob/feature/emotion/src/components/OffCanvas.js (main repo) scrolling on touch devices is locked within the overlay panels.Tagging @andrico1234 for iOS changes.