From c1609bcab8f97e52ff7e9b40be3b000a05d13bfc Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Tue, 19 May 2015 18:44:45 -0700 Subject: [PATCH] [ReactNative] Navigator fix for sceneStyle Summary: Fixes https://github.com/facebook/react-native/issues/1332 When the absolute left position is not set to zero on a provided sceneStyle, scene enabling is broken and no scene will be visible when it is pushed. This was broken recently when the scene disabling was modified to push the scenes offscreen. Closes https://github.com/facebook/react-native/pull/1347 Github Author: Eric Vicenti @public Test Plan: Tested when pushing a scene Navigator in the UIExplorer example while sceneStyle is set on the Navigator --- Libraries/CustomComponents/Navigator/Navigator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/CustomComponents/Navigator/Navigator.js b/Libraries/CustomComponents/Navigator/Navigator.js index 2327316fc..569351745 100644 --- a/Libraries/CustomComponents/Navigator/Navigator.js +++ b/Libraries/CustomComponents/Navigator/Navigator.js @@ -688,7 +688,7 @@ var Navigator = React.createClass({ */ _enableScene: function(sceneIndex) { // First, determine what the defined styles are for scenes in this navigator - var sceneStyle = flattenStyle(this.props.sceneStyle); + var sceneStyle = flattenStyle([styles.baseScene, this.props.sceneStyle]); // Then restore the left value for this scene var enabledSceneNativeProps = { left: sceneStyle.left,