From 013c2a36dd4ad88ebd23b80d71ac530783656fcd Mon Sep 17 00:00:00 2001 From: James Ide Date: Tue, 21 Apr 2015 23:46:34 -0700 Subject: [PATCH] [RootView] Fix positioning of the root view content (frame -> bounds) The root view's content was being rendered at the wrong offset when it was not positioned at (0, 0) exactly, because the shadow view's frame was set to the root view's frame when it should have been set to the root view's bounds instead. Test Plan: Render a root view positioned at (0, 100) and see that its content is positioned where the root view is, not at (0, 200). --- React/Base/RCTRootView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Base/RCTRootView.m b/React/Base/RCTRootView.m index c9a97dfd134e6a..2e5279030450f0 100644 --- a/React/Base/RCTRootView.m +++ b/React/Base/RCTRootView.m @@ -169,7 +169,7 @@ - (void)layoutSubviews [super layoutSubviews]; if (_contentView) { _contentView.frame = self.bounds; - [_bridge.uiManager setFrame:self.frame forRootView:_contentView]; + [_bridge.uiManager setFrame:self.bounds forRootView:_contentView]; } }