diff --git a/src/screens/ComposeScreen.tsx b/src/screens/ComposeScreen.tsx index 8448fae3..caeef0e0 100644 --- a/src/screens/ComposeScreen.tsx +++ b/src/screens/ComposeScreen.tsx @@ -662,6 +662,9 @@ export default function ComposeScreen({ route, navigation }: Props) { }); const editorRef = React.useRef(null); + const subjectRef = React.useRef(null); + const plainBodyRef = React.useRef(null); + const [subjectFocused, setSubjectFocused] = React.useState(false); const isPickingSuggestion = React.useRef(false); // Track inline-image placeholders that haven't yet been rewritten to cid: // until send time. Maps cid → blobId/type/name/size. @@ -2249,7 +2252,13 @@ export default function ComposeScreen({ route, navigation }: Props) { isPickingSuggestion.current = false; }, 200); }} - onSubmitEditing={() => addTyped(field)} + // Return turns typed text into a chip; on an empty field it + // moves on to the subject. + returnKeyType="next" + onSubmitEditing={() => { + if (inputFor(field).trim()) addTyped(field); + else subjectRef.current?.focus(); + }} blurOnSubmit={false} keyboardType="email-address" autoCapitalize="none" @@ -2383,12 +2392,24 @@ export default function ComposeScreen({ route, navigation }: Props) { {t('email_composer.subject', 'Subject')} setSubjectFocused(true)} + onBlur={() => setSubjectFocused(false)} + returnKeyType="next" + blurOnSubmit={false} + onSubmitEditing={() => { + if (plainTextMode) plainBodyRef.current?.focus(); + else editorRef.current?.focus(); + }} /> @@ -2407,6 +2428,7 @@ export default function ComposeScreen({ route, navigation }: Props) { {plainTextMode ? (