Skip to content

Commit

Permalink
[RootView] Fix positioning of the root view content (frame -> bounds)
Browse files Browse the repository at this point in the history
Summary:
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.

Closes #963
Github Author: James Ide <[email protected]>

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).
  • Loading branch information
ide committed Apr 23, 2015
1 parent 27252e6 commit af61b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Base/RCTRootView.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,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];
}
}

Expand Down

0 comments on commit af61b13

Please sign in to comment.