diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-09-29 07:10:22 +0000 |
|---|---|---|
| committer | Benjamin Vray <bvr@odoo.com> | 2020-09-29 08:45:11 +0000 |
| commit | b371cb42cb67115692464c102813b7ebd54785d9 (patch) | |
| tree | efac05dffa507bf51b052a1e9b9100610c36d001 /addons/website/static/src/js | |
| parent | 1a17eb93e9acc3c23682582ebbde59b38c086a05 (diff) | |
[FIX] website: fix full height snippet option
Before this commit the height of a snippet with the full height option
enabled was not correctly updated.
task-2312878
closes odoo/odoo#58760
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src/js')
| -rw-r--r-- | addons/website/static/src/js/content/snippets.animation.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website/static/src/js/content/snippets.animation.js b/addons/website/static/src/js/content/snippets.animation.js index 368be2e810b..d3401a1f196 100644 --- a/addons/website/static/src/js/content/snippets.animation.js +++ b/addons/website/static/src/js/content/snippets.animation.js @@ -984,7 +984,8 @@ registry.FullScreenHeight = publicWidget.Widget.extend({ const windowHeight = $(window).outerHeight(); // Doing it that way allows to considerer fixed headers, hidden headers, // connected users, ... - const mainTopPos = $('#wrapwrap > main')[0].getBoundingClientRect().top; + const firstContentEl = $('#wrapwrap > main > :first-child')[0]; // first child to consider the padding-top of main + const mainTopPos = firstContentEl.getBoundingClientRect().top + dom.closestScrollable(firstContentEl.parentNode).scrollTop; return (windowHeight - mainTopPos); }, }); |
