fix: message edit textarea height

This commit is contained in:
Timothy J. Baek 2024-03-06 11:09:04 -08:00
parent 34b6a99601
commit 534ba9e4f0
2 changed files with 3 additions and 1 deletions

View File

@ -344,6 +344,7 @@
class=" bg-transparent outline-none w-full resize-none" class=" bg-transparent outline-none w-full resize-none"
bind:value={editedContent} bind:value={editedContent}
on:input={(e) => { on:input={(e) => {
e.target.style.height = '';
e.target.style.height = `${e.target.scrollHeight}px`; e.target.style.height = `${e.target.scrollHeight}px`;
}} }}
/> />

View File

@ -168,7 +168,8 @@
class=" bg-transparent outline-none w-full resize-none" class=" bg-transparent outline-none w-full resize-none"
bind:value={editedContent} bind:value={editedContent}
on:input={(e) => { on:input={(e) => {
messageEditTextAreaElement.style.height = `${messageEditTextAreaElement.scrollHeight}px`; e.target.style.height = '';
e.target.style.height = `${e.target.scrollHeight}px`;
}} }}
/> />