From bc192e8eb361d06a7878e9abc2a5b90a7a4fea3d Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 9 Mar 2024 08:23:35 +0200 Subject: [PATCH] fix typing expiry --- files/assets/js/chat.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files/assets/js/chat.js b/files/assets/js/chat.js index ba61313a7..b307d710f 100644 --- a/files/assets/js/chat.js +++ b/files/assets/js/chat.js @@ -241,8 +241,6 @@ function remove_typing() { } ta.addEventListener("input", function() { - clearTimeout(timer_id) - text = ta.value if (!text && is_typing){ is_typing = false; @@ -251,6 +249,7 @@ ta.addEventListener("input", function() { else if (text && !is_typing) { is_typing = true; socket.emit('typing', true); + clearTimeout(timer_id) timer_id = setTimeout(remove_typing, 2000); } })