浏览代码

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) => {