From b2b1479fc34a34a10129a765ac37906e86d7ee54 Mon Sep 17 00:00:00 2001 From: copyhold Date: Thu, 25 Jan 2024 16:38:32 +0200 Subject: [PATCH 1/2] Added focus --- web/screens/Chat/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/screens/Chat/index.tsx b/web/screens/Chat/index.tsx index 684027e49..f86460f1c 100644 --- a/web/screens/Chat/index.tsx +++ b/web/screens/Chat/index.tsx @@ -74,6 +74,9 @@ const ChatScreen = () => { } useEffect(() => { + if (textareaRef.current) { + textareaRef.current.focus() + } if (isWaitingToSend && activeThreadId) { setIsWaitingToSend(false) sendChatMessage() @@ -85,6 +88,7 @@ const ChatScreen = () => { if (textareaRef.current) { textareaRef.current.style.height = '40px' textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px' + textareaRef.current.focus() } }, [currentPrompt]) From 982b0dcd4e19a9bc8dd23558e523e4c4a5de2be4 Mon Sep 17 00:00:00 2001 From: copyhold Date: Sun, 28 Jan 2024 11:59:33 +0200 Subject: [PATCH 2/2] Revert --- web/screens/Chat/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/screens/Chat/index.tsx b/web/screens/Chat/index.tsx index a51f5f3ed..6da8af13f 100644 --- a/web/screens/Chat/index.tsx +++ b/web/screens/Chat/index.tsx @@ -46,6 +46,7 @@ const ChatScreen: React.FC = () => { // 'image/*': ['.png', '.jpg', '.jpeg'], 'application/pdf': ['.pdf'], }, + onDragOver: (e) => { if ( e.dataTransfer.items.length === 1 &&