From 6f0f8e22abc2ebdea303ad84848da4f30b39d819 Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Tue, 27 Jul 2021 08:01:34 +0000 Subject: [PATCH] [FIX] website_animate: fix start of animations Before this commit, the calculation of the top position of the animated elements did not take into account the fact that the scrollable element is no longer the body. And therefore the animations never started. task-2215118 closes odoo/design-themes#58 X-original-commit: d3a05c4ef5d349c35623f090aeb2826c4cdb832d Signed-off-by: Quentin Smetz (qsm) --- website_animate/static/src/js/o_animate.frontend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website_animate/static/src/js/o_animate.frontend.js b/website_animate/static/src/js/o_animate.frontend.js index 859376b7d..ef59ce471 100644 --- a/website_animate/static/src/js/o_animate.frontend.js +++ b/website_animate/static/src/js/o_animate.frontend.js @@ -55,7 +55,7 @@ var WebsiteAnimate = { // We need to offset for the change in position from some animation // So we get the top value by not taking CSS transforms into calculations - var elTop = self.getElementOffsetTop($el[0]); + var elTop = self.getElementOffsetTop($el[0]) - $().getScrollingElement().scrollTop(); var visible = windowBottom > (elTop + elOffset) && windowTop < (elTop + elHeight - elOffset);