Offcanvas content does not scroll
the-ge opened this issue · 1 comments
When its height is bigger than the viewport, the offcanvas cannot be scrolled. All demos but https://codepen.io/vmitsaras/pen/wrLePg exhibit this behaviour.
I tried to make it work by absolute positioning the offcanvas container. The scrolling works, but when opening, the offcanvas makes the body scroll to top, which is an undesirable behaviour. I suppose one way of solving this would be reading the scroll position at the opening time, then setting the top Css property.
Is there an easier way of achieving scrollable offcanvas?
@vmitsaras you should open this again.
the focus of the scroll action should be in in the menu (setting the main page [html/body] to overflow:hidden, and the container of the menu to overflow-y:auto, and when the menu closes restoring the default values of the page [similar to 'popup' modals])