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');
|
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');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user