Skip to content

Commit

Permalink
Fabric: Fixed double-application of opacity and background-color
Browse files Browse the repository at this point in the history
…props on TextInput

Summary:
These props are applied to `View`, therefore they most not be a part of base text attributes, so we reset them.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: mdvacca

Differential Revision: D19764144

fbshipit-source-id: a0d2900e3161c47b83114360c843fa85a4389f8a
  • Loading branch information
shergin authored and facebook-github-bot committed Feb 6, 2020
1 parent 13d8f48 commit 8fe6883
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ TextInputProps::TextInputProps(
TextAttributes TextInputProps::getEffectiveTextAttributes() const {
auto result = TextAttributes::defaultTextAttributes();
result.apply(textAttributes);

/*
* These props are applied to `View`, therefore they must not be a part of
* base text attributes.
*/
result.backgroundColor = clearColor();
result.opacity = 1;

return result;
}

Expand Down

0 comments on commit 8fe6883

Please sign in to comment.