From f37e647a1c0264a3b6229c270e75b8176ec93628 Mon Sep 17 00:00:00 2001 From: whoswhip Date: Thu, 5 Feb 2026 16:04:16 -0500 Subject: [PATCH] fix: simplify height adjustment logic for text area and markdown container --- SharpbinV3.Client/src/routes/+page.svelte | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/SharpbinV3.Client/src/routes/+page.svelte b/SharpbinV3.Client/src/routes/+page.svelte index e6b2440..e7d73f9 100644 --- a/SharpbinV3.Client/src/routes/+page.svelte +++ b/SharpbinV3.Client/src/routes/+page.svelte @@ -65,17 +65,9 @@ let max: number; let element = markdown ? markdownConatiner : textArea; - if (!markdown) { - textArea.style.height = 'auto'; - - h = textArea.scrollHeight; + element.style.height = 'auto'; + h = element.scrollHeight; max = MAX_HEIGHT(); - } else { - markdownConatiner.style.height = 'auto'; - - h = markdownConatiner.scrollHeight; - max = MAX_HEIGHT(); - } if (h > max) { element.style.height = max + 'px';