From 76dc14684d9a3cab0e8efcac6f61e9b6b96278a1 Mon Sep 17 00:00:00 2001 From: Eric Vicenti Date: Thu, 30 Apr 2015 15:53:27 -0700 Subject: [PATCH] [ReactNative] Navigator block touches to non-active scenes Summary: When tapping a link quickly, it will cause two scenes to be pushed on. This prevents against that case by swallowing touches for all non-active scenes. @public Test Plan: Can no longer double-push scenes --- .../CustomComponents/Navigator/Navigator.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Libraries/CustomComponents/Navigator/Navigator.js b/Libraries/CustomComponents/Navigator/Navigator.js index 538c35538..86d068f9f 100644 --- a/Libraries/CustomComponents/Navigator/Navigator.js +++ b/Libraries/CustomComponents/Navigator/Navigator.js @@ -1176,12 +1176,18 @@ var Navigator = React.createClass({ var scene = shouldRenderScene ? this._renderScene(route, i, sceneNavigatorContext) : null; return ( - - {scene} - + ( + i !== this.state.presentedIndex + )}> + + {scene} + + ); },