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);