[ReactNative] Fix touch issue caused by D2036644 after swiping back

This commit is contained in:
Eric Vicenti 2015-05-01 16:19:27 -07:00
parent 6abf37b47e
commit 5453be2ab2
1 changed files with 9 additions and 12 deletions

View File

@ -1176,18 +1176,12 @@ var Navigator = React.createClass({
var scene = shouldRenderScene ?
this._renderScene(route, i, sceneNavigatorContext) : null;
return (
<View
style={styles.defaultSceneStyle}
onStartShouldSetResponder={() => (
i !== this.state.presentedIndex
)}>
<NavigatorStaticContextContainer
navigatorContext={sceneNavigatorContext}
key={'nav' + i}
shouldUpdate={shouldRenderScene}>
{scene}
</NavigatorStaticContextContainer>
</View>
<NavigatorStaticContextContainer
navigatorContext={sceneNavigatorContext}
key={'nav' + i}
shouldUpdate={shouldRenderScene}>
{scene}
</NavigatorStaticContextContainer>
);
},
@ -1202,6 +1196,9 @@ var Navigator = React.createClass({
<View
key={this.state.idStack[i]}
ref={'scene_' + i}
onStartShouldSetResponderCapture={() => {
return i !== this.state.presentedIndex;
}}
style={[initialSceneStyle, this.props.sceneStyle]}>
{React.cloneElement(child, {
ref: this._handleItemRef.bind(null, this.state.idStack[i]),