Skip to content
Snippets Groups Projects

Add scrollbar to menu if necessary

Merged Tögl, Christina requested to merge scrollable-menu into master
4 unresolved threads
@@ -417,10 +417,10 @@ export class AppShell extends ScopedElementsMixin(LitElement) {
if (this.isMenuOverflow && !menu.classList.contains('hidden')) {
// default value if menu is in sticky position
let topValue = 46.5;
let topValue = 45.5;
// if menu is not in sticky position the top value must be calculated
if (window.pageYOffset < 96) {
topValue = 142.5 - window.pageYOffset;
topValue = 141.5 - window.pageYOffset;
}
menu.setAttribute('style', 'position: fixed;top: ' + topValue + 'px;bottom: 0;border-bottom: 0;');
menu.scrollTop = 0;
Loading