Skip to content

Commit 7d20de4

Browse files
sherginfacebook-github-bot
authored andcommitted
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
1 parent 5f48bd8 commit 7d20de4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Libraries/Text/Text/RCTTextShadowView.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ - (void)layoutSubviewsWithContext:(RCTLayoutContext)layoutContext
298298
maximumSize:frame.size
299299
layoutDirection:self.layoutMetrics.layoutDirection
300300
layoutContext:localLayoutContext];
301+
302+
// Reinforcing a proper frame origin for the Shadow View.
303+
RCTLayoutMetrics localLayoutMetrics = shadowView.layoutMetrics;
304+
localLayoutMetrics.frame.origin = frame.origin;
305+
[shadowView layoutWithMetrics:localLayoutMetrics layoutContext:localLayoutContext];
301306
}
302307
];
303308
}

0 commit comments

Comments
 (0)