run fixedHeader asynchronously to prevent self-triggering
This commit is contained in:
parent
efd68b5b48
commit
3fe3129a55
|
@ -541,7 +541,7 @@ function detectLayout() {
|
|||
body.classList.add('fixed-header');
|
||||
}
|
||||
}, 250);
|
||||
window.addEventListener('scroll', fixedHeader);
|
||||
window.addEventListener('scroll', fixedHeader, {passive: true});
|
||||
}
|
||||
} else {
|
||||
body.classList.remove('compact-layout');
|
||||
|
|
Loading…
Reference in New Issue
Block a user