summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2021-03-16 13:53:51 +0000
committerqsm-odoo <qsm@odoo.com>2021-03-16 13:53:51 +0000
commit71b6fc7341dfec5e8fc2352c3143b1e324a880f8 (patch)
treefcd428849f21638efdb93183f38c13178bd892cb /addons/web/static/src
parent221ea6079b2beeb66c4cfa48b237791e1b380c5e (diff)
[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) <qsm@odoo.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/libs/jquery.js2
1 files changed, 1 insertions, 1 deletions
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);