Angular Material sidenav with submenu does not push properly when scrollbar visible

Evanst picture Evanst · Jun 13, 2018 · Viewed 9.7k times · Source

I am using Angular Material sidenav and my menu has a sub menu. When I open the sub menu a scrollbar appears making the sidenav slightly larger and it covers some of the main content.

See this Stackblitz https://stackblitz.com/edit/angular-raedvz, expand the sub menu and you will see the behavior.

Answer

Shadowlauch picture Shadowlauch · Jun 13, 2018

Adding the autosize attribute should fix your problem. Though that seems to have a performance impact.

Have a look at this github issue: https://github.com/angular/material2/issues/9601