Skip to content

Commit

Permalink
Fixed incorrect opacity behaviour for <Text> component on iOS (#24435)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shergin authored and facebook-github-bot committed Apr 15, 2019
1 parent 3273d23 commit d99e657
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Libraries/Text/Text/RCTTextShadowView.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ - (void)didSetProps:(NSArray<NSString *> *)changedProps
// the RCTTextView backgroundColor to be used, without affecting nested Text
// components.
self.textAttributes.backgroundColor = nil;
self.textAttributes.opacity = NAN;
}

- (BOOL)isYogaLeafNode
Expand Down

0 comments on commit d99e657

Please sign in to comment.