From 071514f02abff58c7418ba4fff0d1dea3f337603 Mon Sep 17 00:00:00 2001 From: Andrew Beal Date: Sun, 26 Oct 2025 01:36:02 +0100 Subject: [PATCH] Remove auto-resize functionality and simplify input field layout - Remove autoResize() function and calls - Set input field height to 100% instead of dynamic resizing - Adjust input padding from var(--size-2-1) to var(--size-2-2) - Remove explicit height: 100% from edit-mode and submit buttons --- Components/ChatWindow.svelte | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/Components/ChatWindow.svelte b/Components/ChatWindow.svelte index df4710b..aef8d56 100644 --- a/Components/ChatWindow.svelte +++ b/Components/ChatWindow.svelte @@ -107,7 +107,6 @@ textareaElement.textContent = ""; userRequest = ""; - autoResize(); await chatService.submit(conversation, editModeActive, currentRequest, { onSubmit: () => { @@ -146,16 +145,6 @@ if (userRequest.trim() === "") { textareaElement.textContent = ""; } - autoResize(); - } - } - - function autoResize() { - if (textareaElement) { - // For contenteditable divs, reset height and set to scrollHeight - textareaElement.style.height = "auto"; - const newHeight = Math.min(textareaElement.scrollHeight, window.innerHeight * 0.3); - textareaElement.style.height = `${newHeight}px`; } } @@ -276,13 +265,14 @@ #input-field { grid-row: 2; grid-column: 2; + height: 100%; max-height: 30vh; border-radius: var(--input-radius); font-weight: var(--input-font-weight); border-width: var(--input-border-width); border-style: solid; border-color: var(--background-modifier-border); - padding: var(--size-2-1) var(--size-2-3); + padding: var(--size-2-2) var(--size-2-3); background-color: var(--background-primary); font-family: var(--font-interface-theme); resize: none; @@ -332,7 +322,6 @@ #edit-mode-button { grid-row: 2; grid-column: 4; - height: 100%; border-radius: var(--button-radius); align-self: end; transition-duration: 0.5s; @@ -341,7 +330,6 @@ #submit-button { grid-row: 2; grid-column: 6; - height: 100%; border-radius: var(--button-radius); padding-left: var(--size-4-5); padding-right: var(--size-4-5);