@devries-cameron20 / t3code-1 / commits / 26285ab805
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): fast typing no longer scrambles text when type-to-focus kicks in (#14595)

Otavio Salvador committed Oct 7, 2026 at 18:03 UTC 26285ab80513260d1ff29d2c3fbe18f21990cb62
1 file changed +5 -1
apps/web/src/components/ComposerPromptEditorTiptap.tsx
+5 -1
@@ -1210,7 +1210,11 @@ function ComposerPromptEditorTiptapInner(props: ComposerPromptEditorProps) {
1210 const focusAt = useCallback(
1211 (nextCursor: number) => {
1212 if (!editor) return;
1213 - editor.view.dom.focus({ preventScroll: true });
1213 + // view.focus() writes the state selection to the DOM as it focuses. A
1214 + // bare DOM focus leaves the native caret at the start until
1215 + // ProseMirror resyncs it 20ms later, and dictation tools type fast
1216 + // enough to land keys there, ahead of the text already inserted.
1217 + editor.view.focus();
1218 // A newer prompt is waiting to be applied (a chip was just inserted
1219 // through the store). Reporting the editor's stale text now would
1220 // overwrite that prompt; the pending rewrite places the caret instead.