ux: focus input after reply selection

This commit is contained in:
Alejandro Gómez
2026-03-16 16:31:54 +01:00
parent ce7b2478cd
commit 437313b7ff

View File

@@ -799,8 +799,10 @@ export function ChatViewer({
// Handle reply button click
const handleReply = useCallback((messageId: string) => {
setReplyTo(messageId);
// Focus the editor so user can start typing immediately
editorRef.current?.focus();
// Focus the editor after context menu closes (next frame)
requestAnimationFrame(() => {
editorRef.current?.focus();
});
}, []);
// Handle scroll to message (when clicking on reply preview)