From 2da6ac87c32ac0ffe9653a1ff84d33be8076f1d8 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 9 Feb 2021 17:35:41 +0100 Subject: [PATCH] Fix initial scroll in rich text --- www/pad/inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/pad/inner.js b/www/pad/inner.js index d31fb07ad..5e529d12d 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -934,7 +934,7 @@ define([ // Get scroll position var sTop = $iframe.scrollTop(); var sTopMax = $iframe.innerHeight() - $('iframe').innerHeight(); - var scrollMax = Math.abs(sTop - sTopMax) < 1; + var scrollMax = Math.abs(sTop - sTopMax) < 1 && sTop; // Apply the changes var patch = (DD).diff(inner, userDocStateDom);