From 3c5e157371e623630c648a274386c11b7cae3586 Mon Sep 17 00:00:00 2001 From: RblSb Date: Mon, 2 Mar 2020 22:56:56 +0300 Subject: Try to fix rare autoscroll problem --- src/client/Main.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/Main.hx b/src/client/Main.hx index 5631594..9d9b90d 100644 --- a/src/client/Main.hx +++ b/src/client/Main.hx @@ -528,7 +528,7 @@ class Main { } textDiv.innerHTML = text; - final isInChatEnd = msgBuf.scrollHeight - msgBuf.scrollTop == msgBuf.clientHeight; + final isInChatEnd = msgBuf.scrollTop + msgBuf.clientHeight >= msgBuf.scrollHeight - 1; userDiv.appendChild(tstamp); userDiv.appendChild(nameDiv); userDiv.appendChild(textDiv); -- cgit v1.2.3