diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 5b2e6981..9e574e9c 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -29,6 +29,16 @@ export default function Conversation() { scrollIntoView(); }, [queries.length, queries[queries.length - 1]]); + useEffect(() => { + const element = document.getElementById('inputbox') as HTMLInputElement; + if (element) { + element.focus(); + console.log("Element with ID 'inputbox' found"); + } else { + console.log("Element with ID 'inputbox' not found"); + } + }, []); + useEffect(() => { const observerCallback: IntersectionObserverCallback = (entries) => { entries.forEach((entry) => { @@ -152,7 +162,9 @@ export default function Conversation() {