diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 1aeb9c938c0cc..391022cc0c61b 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -1478,7 +1478,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(); }