summaryrefslogtreecommitdiff
path: root/common/modules/buffer.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'common/modules/buffer.jsm')
-rw-r--r--common/modules/buffer.jsm5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm
index 0fc93393..65c60efe 100644
--- a/common/modules/buffer.jsm
+++ b/common/modules/buffer.jsm
@@ -1377,6 +1377,11 @@ var Buffer = Module("Buffer", {
if (node.dactylScrollTimer)
node.dactylScrollTimer.cancel();
+ if (x == null)
+ x = elem.scrollLeft;
+ if (y == null)
+ y = elem.scrollTop;
+
x = node.dactylScrollDestX = Math.min(x, elem.scrollWidth - elem.clientWidth);
y = node.dactylScrollDestY = Math.min(y, elem.scrollHeight - elem.clientHeight);
let [startX, startY] = [elem.scrollLeft, elem.scrollTop];