From 9b50517c38db3af98c37aabae94d092947b90641 Mon Sep 17 00:00:00 2001 From: Webifi Date: Sun, 28 May 2023 14:25:47 -0500 Subject: [PATCH] Correctly auto-size textarea in firefox. --- src/lib/Chat.svelte | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/Chat.svelte b/src/lib/Chat.svelte index 03ff082..23dd8f0 100644 --- a/src/lib/Chat.svelte +++ b/src/lib/Chat.svelte @@ -573,9 +573,9 @@ if (event.target === null) return autoGrowInput(event.target as HTMLTextAreaElement) } - + const autoGrowInput = (el: HTMLTextAreaElement) => { - el.style.height = 'auto' + el.style.height = '38px'; // don't use "auto" here. Firefox will over-size. el.style.height = el.scrollHeight + 'px' } @@ -980,4 +980,7 @@ .running-totals { opacity: 0.5; } + .chat-input { + /* padding:0; */ + }