Browse Source

fix: textarea input height issue

Timothy Jaeryang Baek 5 months ago
parent
commit
2a5506a9cd

+ 3 - 4
src/lib/components/chat/Chat.svelte

@@ -888,11 +888,10 @@
 		await tick();
 
 		// Reset chat input textarea
-		const chatInputContainer = document.getElementById('chat-input-container');
+		const chatInputElement = document.getElementById('chat-input');
 
-		if (chatInputContainer) {
-			chatInputContainer.value = '';
-			chatInputContainer.style.height = '';
+		if (chatInputElement) {
+			chatInputElement.style.height = '';
 		}
 
 		const _files = JSON.parse(JSON.stringify(files));

+ 0 - 1
src/lib/components/chat/MessageInput.svelte

@@ -881,7 +881,6 @@
 											on:input={async (e) => {
 												e.target.style.height = '';
 												e.target.style.height = Math.min(e.target.scrollHeight, 200) + 'px';
-												user = null;
 											}}
 											on:focus={async (e) => {
 												e.target.style.height = '';