Skip to content

Commit a54b964

Browse files
Gilles DebunneAndroid (Google) Code Review
authored andcommitted
Merge "Restored selectAllOnFocus"
2 parents adbbf7a + 4bb2833 commit a54b964

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/java/android/widget/TextView.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8386,10 +8386,6 @@ public boolean onTouchEvent(MotionEvent event) {
83868386
}
83878387

83888388
if (touchIsFinished && (isTextEditable() || mTextIsSelectable)) {
8389-
// Move cursor
8390-
final int offset = getOffsetForPosition(event.getX(), event.getY());
8391-
Selection.setSelection((Spannable) mText, offset);
8392-
83938389
// Show the IME, except when selecting in read-only text.
83948390
final InputMethodManager imm = InputMethodManager.peekInstance();
83958391
viewClicked(imm);
@@ -8416,6 +8412,9 @@ public void run() {
84168412
postDelayed(mShowSuggestionRunnable,
84178413
ViewConfiguration.getDoubleTapTimeout());
84188414
} else if (hasInsertionController()) {
8415+
// Move cursor
8416+
final int offset = getOffsetForPosition(event.getX(), event.getY());
8417+
Selection.setSelection((Spannable) mText, offset);
84198418
getInsertionController().show();
84208419
}
84218420
}

0 commit comments

Comments
 (0)