Skip to content

Commit 0239b40

Browse files
committed
[Text] Ensure that the text background is transparent by default
For a very simple view I was observing that the text background was black and had to manually be set to transparent. This ensures that text nodes have a transparent background by default. Test Plan: This example component no longer renders what looks like a black block, and instead displays legible text. var Example = React.createClass({ render: function() { return ( <View style={styles.container}> <Text>hello</Text> </View> ); }, }); var styles = StyleSheet.create({ container: { flex: 1, }, };
1 parent 2bb10cd commit 0239b40

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Libraries/Text/RCTText.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ - (instancetype)initWithFrame:(CGRect)frame
3333
_textStorage = [[NSTextStorage alloc] init];
3434
[_textStorage addLayoutManager:_layoutManager];
3535

36+
self.opaque = NO;
3637
self.contentMode = UIViewContentModeRedraw;
3738
}
3839

0 commit comments

Comments
 (0)