offcanvas: don't allow scrolling the page if the viewport is blocked (mobile)
Created by: korki43
You shouldn't be able to scroll on the page if your entire viewport is blocked by an offcanvas with scroll=true
. This happens on a lot of mobile devices.
Example: Go to the offcanvas docs, on a mobile phone, in reponsive design mode or with an extremly thin window and open a scrollable offcanvas. You will be able to scroll the page while you're only seeing the offcanvas. If you close the offcanvas you'll be on a different point on the page. If the offcanvas itself is also scrollable the scrollbars are even weirder (example).
This can probably be fixed by checking if the width of offcanvas equals the window width before enabling scrolling.