diff --git a/apps/web/components/common/title-editor.tsx b/apps/web/components/common/title-editor.tsx index 14837b27..05b99ca6 100644 --- a/apps/web/components/common/title-editor.tsx +++ b/apps/web/components/common/title-editor.tsx @@ -117,11 +117,13 @@ const TitleEditor = forwardRef( }, }); - // Auto-focus after mount + // Auto-focus after mount — delay to wait for Dialog open animation useEffect(() => { if (autoFocus && editor) { - // Move cursor to end - editor.commands.focus("end"); + const timer = setTimeout(() => { + editor.commands.focus("end"); + }, 50); + return () => clearTimeout(timer); } }, [autoFocus, editor]);