From a02814621e5a42c3a6c9f0abcb173c16ff96eb3f Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Fri, 2 Jun 2023 12:45:30 +0700 Subject: [PATCH] Fix chat input --- resources/chatbox.scss | 2 +- templates/chat/chat.html | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/chatbox.scss b/resources/chatbox.scss index ae2be84..c433ce1 100644 --- a/resources/chatbox.scss +++ b/resources/chatbox.scss @@ -63,7 +63,7 @@ #chat-input { width: 100%; - padding: 0.4em 4em 0.6em 1.2em; + padding: 0.4em 4em 1em 1.2em; border: 0; color: black; border-top-left-radius: 0; diff --git a/templates/chat/chat.html b/templates/chat/chat.html index 4993436..beb38b4 100644 --- a/templates/chat/chat.html +++ b/templates/chat/chat.html @@ -560,6 +560,10 @@ return !in_user_redirect; }); + $("#chat-input").on("keyup", function() { + $("#chat-input").scrollTop($("#chat-input")[0].scrollHeight); + }); + // https://stackoverflow.com/questions/42121565/detecting-class-change-without-setinterval if (typeof(MutationObserver) !== undefined) { var observer = new MutationObserver(function (event) {