WebUI: fix edit msg form textarea height (#20830)
* autoresize textarea on mount * allow textarea to grow to same height as rendered messages * add UI build file
This commit is contained in:
Binary file not shown.
@@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
if (textareaElement) {
|
if (textareaElement) {
|
||||||
|
autoResizeTextarea(textareaElement);
|
||||||
textareaElement.focus();
|
textareaElement.focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -50,8 +51,9 @@
|
|||||||
<textarea
|
<textarea
|
||||||
bind:this={textareaElement}
|
bind:this={textareaElement}
|
||||||
bind:value
|
bind:value
|
||||||
class="text-md max-h-32 min-h-12 w-full resize-none border-0 bg-transparent p-0 leading-6 outline-none placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0"
|
class="text-md min-h-12 w-full resize-none border-0 bg-transparent p-0 leading-6 outline-none placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0"
|
||||||
class:cursor-not-allowed={disabled}
|
class:cursor-not-allowed={disabled}
|
||||||
|
style="max-height: var(--max-message-height);"
|
||||||
{disabled}
|
{disabled}
|
||||||
onkeydown={onKeydown}
|
onkeydown={onKeydown}
|
||||||
oninput={(event) => {
|
oninput={(event) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user