From 03714a8becb76194b5f7565bfafebb26b17e99b0 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:20:48 -0800 Subject: [PATCH] fix hasFocus bug --- apps/client/src/features/editor/title-editor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/client/src/features/editor/title-editor.tsx b/apps/client/src/features/editor/title-editor.tsx index c3610394..33d1984e 100644 --- a/apps/client/src/features/editor/title-editor.tsx +++ b/apps/client/src/features/editor/title-editor.tsx @@ -157,7 +157,9 @@ export function TitleEditor({ useEffect(() => { setTimeout(() => { - titleEditor?.commands.focus("end"); + // guard against Cannot access view['hasFocus'] error + if (!titleEditor?.isInitialized) return; + titleEditor?.commands?.focus("end"); }, 500); }, [titleEditor]);