From fc0b62f122e44b142db6dee133a099df391ec2fa Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 3 Oct 2016 06:51:57 +0200 Subject: [PATCH] Revert "scroll.js --> fix scroll measures" This reverts commit 0c5d95c943f71c7f0e0566a5be10d9db75238833. Using those values is probably okay as long as we adjust for the off-by-one errors which will follow in the next commit. --- qutebrowser/javascript/scroll.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/qutebrowser/javascript/scroll.js b/qutebrowser/javascript/scroll.js index cd8a5baab..699a59599 100644 --- a/qutebrowser/javascript/scroll.js +++ b/qutebrowser/javascript/scroll.js @@ -66,8 +66,18 @@ window._qutebrowser.scroll = (function() { var pos = { "px": {"x": window.scrollX, "y": window.scrollY}, "scroll": { - "width": Math.max(body.scrollWidth, elem.scrollWidth), - "height": Math.max(body.scrollHeight, elem.scrollHeight), + "width": Math.max( + body.scrollWidth, + body.offsetWidth, + elem.scrollWidth, + elem.offsetWidth + ), + "height": Math.max( + body.scrollHeight, + body.offsetHeight, + elem.scrollHeight, + elem.offsetHeight + ), }, "inner": { "width": window.innerWidth,