[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#58782 X-original-commit: b371cb42cb67115692464c102813b7ebd54785d9 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -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);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user