Skip to content

Commit 970a138

Browse files
Viktor YakovelJohan Redestig
authored andcommitted
Text disappears when selecting text in text editor.
The problem appears when the user selects, copies and paste text and then selects text again. The second time text is selected, the copied text becomes visible in the text field. Change-Id: Iae19d1659f58ad2e1c6f1a98bdef8bbedabd447f
1 parent ef9d148 commit 970a138

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/java/android/widget/TextView.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4549,6 +4549,10 @@ boolean extractTextInternal(ExtractedTextRequest request,
45494549
outText.text = TextUtils.substring(content, partialStartOffset,
45504550
partialEndOffset);
45514551
}
4552+
} else {
4553+
outText.partialStartOffset = 0;
4554+
outText.partialEndOffset = 0;
4555+
outText.text = "";
45524556
}
45534557
outText.flags = 0;
45544558
if (MetaKeyKeyListener.getMetaState(mText, MetaKeyKeyListener.META_SELECTING) != 0) {

0 commit comments

Comments
 (0)