Keep message field focused after starting chat#2399
Conversation
481df47 to
05e13be
Compare
05e13be to
b12ce79
Compare
|
Record video what presently does not work you there? What happens if chat is started by clicking button? Start chat can do not have send message area and in temporary status you still focusing area... |
firefox_f1LZzQfkpS.mp4Hello! I have recorded a video to demonstrate the issue, as you requested. The reason it might be difficult to notice the problem on the official demo site (livehelperchat.com) is that the default theme lacks a clear visual highlight for the active/focused input field—it only shows a blinking cursor. To make the issue clearly visible, I demonstrated it on my own website where I use a custom theme. In my theme, the active input field is distinctly highlighted with a red border when it is in focus. As you can see in the attached video: This brief loss of focus is exactly the problem I am referring to. I hope the video helps clarify this! |
|
And i don't have this issue adding. Green border remains all long way untill chat starts. You could easily replace it on official demo. |
|
Closing this PR because the maintainer could not reproduce the focus loss in the default widget and pointed out that the visible focus state should be handled at theme/CSS level. I have reverted the React/widget changes on my production instance and moved the visible focus styling to my local theme CSS instead. Thanks for checking it. |
This improves the first-message UX in the React widget.
Before this change, starting a chat can visually look like the message textarea loses focus while the widget transitions from
StartChattoOnlineChat.StartChatalready focuses#CSChatMessagebefore submitting, but the component switch can still briefly interrupt the focused input.The change stores a short-lived flag when the start-chat message field was focused and restores focus once
OnlineChathas mounted, using the same widget/popup visibility condition that already guards the existing focus logic.Tested with:
npm cinpm run build