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 --- res/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'res/client.js') diff --git a/res/client.js b/res/client.js index 224cb9e..cc8a891 100644 --- a/res/client.js +++ b/res/client.js @@ -1241,7 +1241,7 @@ client_Main.prototype = { } } textDiv.innerHTML = text; - var isInChatEnd = msgBuf.scrollHeight - msgBuf.scrollTop == msgBuf.clientHeight; + var isInChatEnd = msgBuf.scrollTop + msgBuf.clientHeight >= msgBuf.scrollHeight - 1; userDiv.appendChild(tstamp); userDiv.appendChild(nameDiv); userDiv.appendChild(textDiv); -- cgit v1.2.3