Skip to content

Commit 438a3b3

Browse files
sganovAndroid (Google) Code Review
authored andcommitted
Merge "Cannot move edit text cursor to first position using character granularity." into jb-mr1-dev
2 parents 6643ea8 + 02c6fca commit 438a3b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/java/android/view/View.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7010,10 +7010,12 @@ private boolean previousAtGranularity(int granularity) {
70107010
int current = getAccessibilityCursorPosition();
70117011
if (current == ACCESSIBILITY_CURSOR_POSITION_UNDEFINED) {
70127012
current = text.length();
7013+
setAccessibilityCursorPosition(current);
70137014
} else if (granularity == AccessibilityNodeInfo.MOVEMENT_GRANULARITY_CHARACTER) {
70147015
// When traversing by character we always put the cursor after the character
70157016
// to ease edit and have to compensate before asking the for previous segment.
70167017
current--;
7018+
setAccessibilityCursorPosition(current);
70177019
}
70187020
final int[] range = iterator.preceding(current);
70197021
if (range == null) {

0 commit comments

Comments
 (0)