From 71b6fc7341dfec5e8fc2352c3143b1e324a880f8 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 16 Mar 2021 13:53:51 +0000 Subject: [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#67961 Signed-off-by: Quentin Smetz (qsm) --- addons/web/static/src/js/libs/jquery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web') diff --git a/addons/web/static/src/js/libs/jquery.js b/addons/web/static/src/js/libs/jquery.js index 471d07bb980..15917cede38 100644 --- a/addons/web/static/src/js/libs/jquery.js +++ b/addons/web/static/src/js/libs/jquery.js @@ -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); -- cgit v1.2.3