Skip to content

Commit f71357a

Browse files
shergingrabbou
authored andcommitted
Fixed incorrect opacity behaviour for <Text> component on iOS (#24435)
Summary: This PR fixes #24229. Seems currently `opacity` props for Text is being applied twice (one for text color and one for the whole view). This PR disables applying the prop to the text. [CATEGORY] [TYPE] - Fixed double applying opacity prop for Text Pull Request resolved: #24435 Differential Revision: D14932795 Pulled By: cpojer fbshipit-source-id: f9280fc75f788424cb5f1e42d2e79efdb354d645
1 parent 17a81be commit f71357a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Libraries/Text/Text/RCTTextShadowView.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
3535
return self;
3636
}
3737

38+
- (void)didSetProps:(NSArray<NSString *> *)changedProps
39+
{
40+
[super didSetProps:changedProps];
41+
42+
self.textAttributes.opacity = NAN;
43+
}
44+
3845
- (BOOL)isYogaLeafNode
3946
{
4047
return YES;

0 commit comments

Comments
 (0)