Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(desktop): auto-focus ChatPanel input on screen capture overlay mount (#14105)

Inneia18569c6901b
diff --git a/apps/desktop/src/overlay/ChatPanel.tsx b/apps/desktop/src/overlay/ChatPanel.tsx
index af1d1fa964d..4d1eac434ee 100644
--- a/apps/desktop/src/overlay/ChatPanel.tsx
+++ b/apps/desktop/src/overlay/ChatPanel.tsx
@@ -252,7 +252,7 @@ const ChatPanel = memo<ChatPanelProps>(
}, [theme]);
useLayoutEffect(() => {
- if (selected && !hidden && textareaRef.current) {
+ if (!hidden && textareaRef.current) {
textareaRef.current.focus();
}
}, [hidden, selected]);