From d103c47cdaf4f4e1af85679ed65750f37aa3d6b3 Mon Sep 17 00:00:00 2001 From: andreawoe Date: Mon, 24 Aug 2026 10:36:24 +0200 Subject: [PATCH] fix(signatures): place caret above the signature in compose and above-quote replies --- components/email/email-composer.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/email/email-composer.tsx b/components/email/email-composer.tsx index 2e09bbe1..f053440a 100644 --- a/components/email/email-composer.tsx +++ b/components/email/email-composer.tsx @@ -760,8 +760,12 @@ export function EmailComposer({ sigInsertedRef.current = true; if (mode === 'compose') { editor.chain().focus('end').insertContent(`

${sig.body}`).run(); + // Place the caret in the empty paragraph above the signature so the user + // starts typing at the top of the new email. + editor.chain().focus('start').run(); } else if ((mode === 'reply' || mode === 'replyAll' || mode === 'forward') && signaturePosition === 'above_quote') { - editor.chain().focus('start').insertContent(sig.body).run(); + editor.chain().focus('start').insertContent(`

${sig.body}`).run(); + editor.chain().focus('start').run(); } }, [selectedSignatureId, plainTextMode, mode, signaturePosition, getSignatureById, editorReady]);