소스 검색

added focus selector

Jannik Streidl 1 년 전
부모
커밋
7c7e16c382
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/lib/components/chat/MessageInput.svelte

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

@@ -293,6 +293,9 @@
 	};
 
 	onMount(() => {
+		const chatInput = document.getElementById('chat-textarea');
+		chatInput?.focus();
+
 		const dropZone = document.querySelector('body');
 
 		const onDragOver = (e) => {