From d53c509e73c91bb6967c8ea9f81bd26a9fc7d153 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Mon, 23 Sep 2024 11:47:24 +0300 Subject: [PATCH] Fix: isOutOfViewport calculation of the block bottom for sticky mode (montage.js) --- web/skins/classic/views/js/montage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/js/montage.js b/web/skins/classic/views/js/montage.js index 5248de103..47dae5b48 100644 --- a/web/skins/classic/views/js/montage.js +++ b/web/skins/classic/views/js/montage.js @@ -862,7 +862,7 @@ function isOutOfViewport(elem) { const out = {}; out.top = (bounding.top < headerHeight) || ( bounding.top > (window.innerHeight || document.documentElement.clientHeight) ); out.left = (bounding.left < 0) || (bounding.left > (window.innerWidth || document.documentElement.clientWidth)); - out.bottom = (bounding.bottom > (window.innerHeight-headerHeight || document.documentElement.clientHeight-headerHeight) ) || (bounding.bottom < 0); + out.bottom = (bounding.bottom > (window.innerHeight-headerHeight || document.documentElement.clientHeight-headerHeight) ) || (bounding.bottom < headerHeight); out.right = (bounding.right > (window.innerWidth || document.documentElement.clientWidth) ) || (bounding.right < 0); out.any = out.top || out.left || out.bottom || out.right; out.all = (out.top && out.bottom ) || (out.left && out.right);