mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-05 22:38:59 +08:00
Fix TextInput text color not applying
Summary: Setting the color for a TextInput with nodes was broken. The text color was not being applied due to an optimization that prevented setting spans if begin and end were the same (which is the case for an empty TextInput). This patch depends on D2962643. Differential Revision: D2962394
This commit is contained in:
@@ -140,6 +140,11 @@ public class RCTTextInput extends RCTVirtualText implements AndroidView, CSSNode
|
||||
mPaddingChanged = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean shouldAllowEmptySpans() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new CharSequence that includes all the text and styling information to create Layout.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user