@bobfrankston/rmfmail 1.2.300 → 1.2.302

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6191,9 +6191,10 @@ function applyInit(init) {
6191
6191
  bodyToRender = isReplyForward ? `<br>${sigBlock}<br>${bodyToRender}` : `${bodyToRender}${sigBlock}`;
6192
6192
  }
6193
6193
  }
6194
+ const focusTarget = !toInput.value ? toInput : !subjectInput.value ? subjectInput : null;
6194
6195
  if (bodyToRender) {
6195
6196
  editor.setHtml(bodyToRender);
6196
- editor.setCursor(0);
6197
+ if (!focusTarget) editor.setCursor(0);
6197
6198
  }
6198
6199
  if (init.draftUid) {
6199
6200
  draftUid = init.draftUid;
@@ -6214,8 +6215,7 @@ function applyInit(init) {
6214
6215
  renderAttachmentChips();
6215
6216
  }
6216
6217
  setComposeTitle(init.subject || "");
6217
- if (!toInput.value) toInput.focus();
6218
- else if (!subjectInput.value) subjectInput.focus();
6218
+ if (focusTarget) focusTarget.focus();
6219
6219
  else editor.focus();
6220
6220
  recordContentBaseline();
6221
6221
  if (init.draftUid && init.draftId) {