[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
This commit is contained in:
parent
e5f47731c6
commit
76dc14684d
|
@ -1176,12 +1176,18 @@ var Navigator = React.createClass({
|
|||
var scene = shouldRenderScene ?
|
||||
this._renderScene(route, i, sceneNavigatorContext) : null;
|
||||
return (
|
||||
<NavigatorStaticContextContainer
|
||||
navigatorContext={sceneNavigatorContext}
|
||||
key={'nav' + i}
|
||||
shouldUpdate={shouldRenderScene}>
|
||||
{scene}
|
||||
</NavigatorStaticContextContainer>
|
||||
<View
|
||||
style={styles.defaultSceneStyle}
|
||||
onStartShouldSetResponder={() => (
|
||||
i !== this.state.presentedIndex
|
||||
)}>
|
||||
<NavigatorStaticContextContainer
|
||||
navigatorContext={sceneNavigatorContext}
|
||||
key={'nav' + i}
|
||||
shouldUpdate={shouldRenderScene}>
|
||||
{scene}
|
||||
</NavigatorStaticContextContainer>
|
||||
</View>
|
||||
);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue