From 88e2297a6edf2352cb74c90f48a3250e39c0f8ad Mon Sep 17 00:00:00 2001 From: Benjamin Vray Date: Tue, 12 Jul 2022 12:00:52 +0000 Subject: [PATCH] [FIX] web: fix scroll to affixed header not fluid This commit improves the smoothness of the scroll animation to an affixed header. As in this case, we stop and continue the animation several times in the "scrollTo" function, we need to force the easing of the animation to "linear" when the scroll animation is restarted in the "progress" of "animate". task-2773973 X-original-commit: 1770f61ebd9ebd0991ee13a93f0e771c9c0ad698 Part-of: odoo/odoo#96067 --- addons/web/static/src/legacy/js/core/dom.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/legacy/js/core/dom.js b/addons/web/static/src/legacy/js/core/dom.js index b736f6c1bb8..5c291b07373 100644 --- a/addons/web/static/src/legacy/js/core/dom.js +++ b/addons/web/static/src/legacy/js/core/dom.js @@ -600,6 +600,7 @@ var dom = { $scrollable.stop(); dom.scrollTo(el, Object.assign({}, options, { duration: remainingMs, + easing: 'linear', })).then(() => resolve()); };