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
This commit is contained in:
Valentin Shergin 2018-02-13 23:25:04 -08:00 committed by Facebook Github Bot
parent 5f48bd84aa
commit 7d20de412b
1 changed files with 5 additions and 0 deletions

View File

@ -298,6 +298,11 @@
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];
}
];
}