diff --git a/apps/desktop/src/renderer/components/Chat/ChatInterface/hooks/useFocusPromptOnPane.ts b/apps/desktop/src/renderer/components/Chat/ChatInterface/hooks/useFocusPromptOnPane.ts index df25e294736..bac0383f03d 100644 --- a/apps/desktop/src/renderer/components/Chat/ChatInterface/hooks/useFocusPromptOnPane.ts +++ b/apps/desktop/src/renderer/components/Chat/ChatInterface/hooks/useFocusPromptOnPane.ts @@ -3,10 +3,11 @@ import { useEffect } from "react"; export function useFocusPromptOnPane(isFocused: boolean) { const { textInput } = usePromptInputController(); + const focusPrompt = textInput.focus; useEffect(() => { if (isFocused) { - textInput.focus(); + focusPrompt(); } - }, [isFocused, textInput]); + }, [focusPrompt, isFocused]); }