Fix registering resize event on wrong object

This commit is contained in:
Svilen Markov 2024-05-23 00:05:21 +01:00
parent d18f645c18
commit d1be4637ad

View File

@ -59,7 +59,7 @@ function setupCarousels() {
const determineSideCutoffsRateLimited = throttledDebounce(determineSideCutoffs, 20, 100);
itemsContainer.addEventListener("scroll", determineSideCutoffsRateLimited);
document.addEventListener("resize", determineSideCutoffsRateLimited);
window.addEventListener("resize", determineSideCutoffsRateLimited);
afterContentReady(determineSideCutoffs);
}