body-scroll-lock
body-scroll-lock copied to clipboard
disableBodyScroll with scrollY > 0 leads to a gap on Firefox Mobile
Browser: Firefox Mobile 81.1.1
OS: Android 10
Description: I'm building a fixed scrollable list with 60% viewport height.
Problem: When calling disableBodyScroll
on the list with a scrollY
-Value greater than 0, scrolling to the bottom of the fixed list leads to a gap above the html
-tag.
Example: https://meowing-wry-mice.glitch.me/ (I included a timeout of 2000ms to be able to scroll before disableBodyScroll
is called).
I can't replicate on Firefox v81 on MacOS - seems like a Firefox Mobile bug. Can you use devtools or something to find out what the gap consists of (e.g. is it margin, padding etc)?
Sure, here you go - it doesn't seem to be a styled spacing. I'm guessing that it's caused by the sticky address bar.
When toggling overflow: hidden
on html
via DevTools the gap disappears until I scroll again in the list and reach either the top or bottom end.
This looks very much like a bug in Firefox Mobile - if you can find a workaround we might be able to use it.
Still seeing the issue, any updates or possible work around?