Skip to content

Commit

Permalink
thunderbird#7618 focus subject or content field on external intent
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenz committed Feb 10, 2024
1 parent 98f0d4f commit 6210852
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {
relatedMessageProcessed = savedInstanceState.getBoolean(STATE_KEY_SOURCE_MESSAGE_PROCED, false);
}


if (initFromIntent(intent)) {
boolean startedByExternalIntent = initFromIntent(intent);
if (startedByExternalIntent) {
action = Action.COMPOSE;
changesMadeSinceLastSave = true;
} else {
Expand Down Expand Up @@ -446,6 +446,13 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {
action == Action.EDIT_DRAFT) {
//change focus to message body.
messageContentView.requestFocus();
} else if (startedByExternalIntent) {
// If started by external intent, focus "Subject" or content field (Issue #7618)
if(subjectView.getText().length() == 0) {
subjectView.requestFocus();
} else {
messageContentView.requestFocus();
}
} else {
// Explicitly set focus to "To:" input field (see issue 2998)
recipientMvpView.requestFocusOnToField();
Expand Down

0 comments on commit 6210852

Please sign in to comment.