langflow-ai / langflow-embedded-chat

The Langflow Embedded Chat is a powerful web component that enables seamless communication with the Langflow
76 stars 30 forks source link

Fix: chat window focus handling #19

Closed anovazzi1 closed 4 months ago

anovazzi1 commented 4 months ago

This pull request fixes the issue with the chat window losing focus. The previous implementation had a listener for loss of focus that refocused the user input after a small delay. However, this caused the input to be refocused multiple times, leading to unexpected behavior. This pull request removes the listener and adds a new useEffect hook to refocus the user input whenever a new response is returned from the LLM.