diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index f1237f771..a52b0967d 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -344,6 +344,7 @@ class=" bg-transparent outline-none w-full resize-none" bind:value={editedContent} on:input={(e) => { + e.target.style.height = ''; e.target.style.height = `${e.target.scrollHeight}px`; }} /> diff --git a/src/lib/components/chat/Messages/UserMessage.svelte b/src/lib/components/chat/Messages/UserMessage.svelte index 18c9b6700..d5e8b81fd 100644 --- a/src/lib/components/chat/Messages/UserMessage.svelte +++ b/src/lib/components/chat/Messages/UserMessage.svelte @@ -168,7 +168,8 @@ class=" bg-transparent outline-none w-full resize-none" bind:value={editedContent} on:input={(e) => { - messageEditTextAreaElement.style.height = `${messageEditTextAreaElement.scrollHeight}px`; + e.target.style.height = ''; + e.target.style.height = `${e.target.scrollHeight}px`; }} />