diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index a1462c4886a0b..d8139b89c084c 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -1474,7 +1474,12 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } } + } else if (mText instanceof Spannable) { + // Reset the selection. + stopTextActionMode(); + Selection.setSelection((Spannable) mText, getSelectionStart(), getSelectionEnd()); } + if (mEditor.hasSelectionController()) { mEditor.startSelectionActionMode(); }