Stop Scroll when modal is open
is there any what to add this by css class?
11 Replies
I use this on the body and remove it with <noscript> or JS
this scrolls the page to the top
maybe take off the pos: fixed?
if your body is not expanding could be that
tried removing pos: fixed, its still scrolls to top
I'd have to see more, I don't have that issue
O wait it does xD
but I have my body at 100% so it don't grow >.>;;
@Aldrin you can try it without overscroll-behavior? I will have to test on a body that grows.
That is there because iOS. I had only tested the once but for my use case it works.
Ok let me try
Because it's me, I do have to suggest
But yeah, browser support and all that 😛
body scrolls though
This issue honestly is a pain in the arse, I need to make a clear codepen I can come back to.
Mobile .... why do mobile browsers have to be so difficult
thanks, it worked 👍
make sure you check iOS, you might need a fallback for it to put the webkit overscroll behavior on those devices
ok 👍