Skip to content

Commit 2eb70fb

Browse files
author
Gilles Debunne
committed
Cursor is moved at end of word when it is added to dictionary
Bug 6355904 Change-Id: Ib56b719d0c3001ce975bccf8dd80c138bffc24cc
1 parent d7f256d commit 2eb70fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/java/android/widget/Editor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,6 +2545,7 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
25452545
// There is no way to know if the word was indeed added. Re-check.
25462546
// TODO The ExtractEditText should remove the span in the original text instead
25472547
editable.removeSpan(suggestionInfo.suggestionSpan);
2548+
Selection.setSelection(editable, spanEnd);
25482549
updateSpellCheckSpans(spanStart, spanEnd, false);
25492550
} else {
25502551
// SuggestionSpans are removed by replace: save them before

0 commit comments

Comments
 (0)