enh: rich text input toggle option

This commit is contained in:
Timothy J. Baek
2024-10-25 21:31:18 -07:00
parent 8b61b39c75
commit adede5480d
4 changed files with 262 additions and 50 deletions

View File

@@ -120,13 +120,16 @@
const chatInputElement = document.getElementById('chat-input');
await tick();
if (chatInputContainerElement) {
chatInputContainerElement.style.height = '';
chatInputContainerElement.style.height =
Math.min(chatInputContainerElement.scrollHeight, 200) + 'px';
}
chatInputElement?.focus();
await tick();
if (chatInputElement) {
chatInputElement.focus();
chatInputElement.dispatchEvent(new Event('input'));
}
};
</script>