[FIX] web: properly find the scrolling element of zoomed pages

To find the main element which scrolls in the page, we rely on its
height being as tall as the body one. The code which checks that was
making a comparison between a rounded value and floating value without
care of the rounding errors that might induce, especially on zoomed
pages.

Fixes https://github.com/odoo/odoo/issues/63306

closes odoo/odoo#67986

X-original-commit: 71b6fc7341dfec5e8fc2352c3143b1e324a880f8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2021-03-16 16:54:58 +00:00
parent 9bf7d15da4
commit e5a701de42
+1 -1
View File
@@ -171,7 +171,7 @@ $.fn.extend({
// Search for a body child which is at least as tall as the body
// and which has the ability to scroll if enough content in it. If
// found, suppose this is the top scrolling element.
if (el.scrollHeight < bodyHeight) {
if (bodyHeight - el.scrollHeight > 1) {
continue;
}
const $el = $(el);