Skip to content

Commit

Permalink
Merge branch 'GH-3257_backport' into 5.6-MAINT
Browse files Browse the repository at this point in the history
  • Loading branch information
cketti committed Apr 2, 2018
2 parents 46a51f1 + 05e10d6 commit f716e96
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,20 @@ public void onFocusChanged(boolean hasFocus, int direction, Rect previous) {
}
}

/**
* TokenCompleteTextView removes composing strings, and etc, but leaves internal composition
* predictions partially constructed. Changing either/or the Selection or Candidate start/end
* positions, forces the IMM to reset cleaner.
*/
@Override
protected void replaceText(CharSequence text) {
super.replaceText(text);

InputMethodManager imm = (InputMethodManager) getContext().getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.updateSelection(this, getSelectionStart(), getSelectionEnd(), -1, -1);
}

private void displayKeyboard() {
InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm == null) {
Expand Down

0 comments on commit f716e96

Please sign in to comment.