diff --git a/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputShadowNode.cpp b/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputShadowNode.cpp index 35f9e47f07c..1446c2d3909 100644 --- a/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputShadowNode.cpp +++ b/ReactCommon/fabric/components/textinput/androidtextinput/AndroidTextInputShadowNode.cpp @@ -45,6 +45,10 @@ AttributedString AndroidTextInputShadowNode::getAttributedString( auto fragment = AttributedString::Fragment{}; fragment.string = getProps()->text; fragment.textAttributes = textAttributes; + // If the TextInput opacity is 0 < n < 1, the opacity of the TextInput and + // text value's background will stack. This is a hack/workaround to prevent + // that effect. + fragment.textAttributes.backgroundColor = clearColor(); fragment.parentShadowView = ShadowView(*this); attributedString.prependFragment(fragment);