diachedelic

Results 117 comments of diachedelic

Are you talking about the [this demo](https://bodyscrolllock-modal.vercel.app/)?

@charkour Did you try https://github.com/tuax/tua-body-scroll-lock?

I know nothing about Gatsby, but assuming gatsbyjs.org is developed using Gatsby, it forces the `` element to scroll: ![image](https://user-images.githubusercontent.com/310464/76574475-84cb0080-6510-11ea-80db-b92be90d86b2.png)

@AidanRRR Can you try replacing all instances of `document.body` with `document.documentElement` in `body-scroll-lock` and see if that helps?

@mdhornet90 by root do you mean the `` element? Are you sure you replaced the `document.body` on [this line](https://github.com/willmcpo/body-scroll-lock/blob/5944b11066f478bd0eb149f65bee733d6fa14208/src/bodyScrollLock.js#L89)? It should apply overflow on the `` element if you did.

Well, perhaps we could restrict overflow of both `` *and* ``...can you think of any issues with this @willmcpo ?

@WickyNilliams why is `disableBodyScroll` called in an SSR environment? @lizy0329 A solution for this might be to change `body-scroll-lock` to prevent overflow on both `document.body` _and_ `document.documentElement`. I don't have...

@WickyNilliams If I were you I would avoid locking the scroll in anything but a browser environment, as it just does not make sense to do so on the server....

@WickyNilliams Yes, this belongs in a seperate issue. But I think you need to understand that disableScrollLock adds event listeners etc, it does not just modify the DOM. It just...