-
Notifications
You must be signed in to change notification settings - Fork 25k
Description
I have a demand, TextInput contains Image and Text.but I find a bug,when Image at first position, I add Text, Text can't display.
I debugging android source. I find one possible reason. In ReactEditText class, the maybeSetText() function set new content, and call manageSpans method that can reset ReactEditText.getText(). but in this method don't remove FrescoBasedReactTextInlineImageSpan.
if (ForegroundColorSpan.class.isInstance(spans[spanIdx]) ||
BackgroundColorSpan.class.isInstance(spans[spanIdx]) ||
AbsoluteSizeSpan.class.isInstance(spans[spanIdx]) ||
CustomStyleSpan.class.isInstance(spans[spanIdx]) ||
ReactTagSpan.class.isInstance(spans[spanIdx])) {
getText().removeSpan(spans[spanIdx]);
}
So ReactEditText.getText() always contain FrescoBasedReactTextInlineImageSpan, Image coverage text display.How can fix this bug?
Please forgive me for not being fluent in English