From 86cfcbc77e428295f850bfc927b6eb3c6fdd30cf Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Tue, 5 May 2015 14:31:41 -0700 Subject: [PATCH] [ReactNative] Navigator fix opacity reset for presented scene Summary: jumpN will call enableScene for the dest scene, which makes sure the scene can be made visible, but we need to avoid resetting the opacity for it when it is already the presented scene. There is already a check to make sure we don't reset opacity for the transitioningFrom scene. @public Test Plan: Fixes the issue on Android device when jumping to a scene that is already presented --- Libraries/CustomComponents/Navigator/Navigator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/CustomComponents/Navigator/Navigator.js b/Libraries/CustomComponents/Navigator/Navigator.js index ad9ea0e8a..d4c97561b 100644 --- a/Libraries/CustomComponents/Navigator/Navigator.js +++ b/Libraries/CustomComponents/Navigator/Navigator.js @@ -689,7 +689,8 @@ var Navigator = React.createClass({ var enabledSceneNativeProps = { left: sceneStyle.left, }; - if (sceneIndex !== this.state.transitionFromIndex) { + if (sceneIndex !== this.state.transitionFromIndex && + sceneIndex !== this.state.presentedIndex) { // If we are not in a transition from this index, make sure opacity is 0 // to prevent the enabled scene from flashing over the presented scene enabledSceneNativeProps.opacity = 0;