Permalink
Browse files

Fixed a bug with positioning of nested views inside <Text>

Summary:
Fixing of recent regression in layout system.
Conseptually, a superview should define frames of child views.

Reviewed By: mmmulani

Differential Revision: D6980128

fbshipit-source-id: e267e966fd46af28db1d3d40939110040b74e33f
  • Loading branch information...
shergin authored and facebook-github-bot committed Feb 14, 2018
1 parent 5f48bd8 commit 7d20de412b37a35951e615d98509573dc1a24bcb
Showing with 5 additions and 0 deletions.
  1. +5 −0 Libraries/Text/Text/RCTTextShadowView.m
@@ -298,6 +298,11 @@ - (void)layoutSubviewsWithContext:(RCTLayoutContext)layoutContext
maximumSize:frame.size
layoutDirection:self.layoutMetrics.layoutDirection
layoutContext:localLayoutContext];
// Reinforcing a proper frame origin for the Shadow View.
RCTLayoutMetrics localLayoutMetrics = shadowView.layoutMetrics;
localLayoutMetrics.frame.origin = frame.origin;
[shadowView layoutWithMetrics:localLayoutMetrics layoutContext:localLayoutContext];
}
];
}

0 comments on commit 7d20de4

Please sign in to comment.