run fixedHeader asynchronously to prevent self-triggering

This commit is contained in:
tophf 2020-10-11 13:26:28 +03:00
parent efd68b5b48
commit 3fe3129a55

View File

@ -541,7 +541,7 @@ function detectLayout() {
body.classList.add('fixed-header'); body.classList.add('fixed-header');
} }
}, 250); }, 250);
window.addEventListener('scroll', fixedHeader); window.addEventListener('scroll', fixedHeader, {passive: true});
} }
} else { } else {
body.classList.remove('compact-layout'); body.classList.remove('compact-layout');