mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 04:24:15 +00:00
[ReactNative] Fix touch issue caused by D2036644 after swiping back
This commit is contained in:
parent
6abf37b47e
commit
5453be2ab2
@ -1176,18 +1176,12 @@ var Navigator = React.createClass({
|
|||||||
var scene = shouldRenderScene ?
|
var scene = shouldRenderScene ?
|
||||||
this._renderScene(route, i, sceneNavigatorContext) : null;
|
this._renderScene(route, i, sceneNavigatorContext) : null;
|
||||||
return (
|
return (
|
||||||
<View
|
<NavigatorStaticContextContainer
|
||||||
style={styles.defaultSceneStyle}
|
navigatorContext={sceneNavigatorContext}
|
||||||
onStartShouldSetResponder={() => (
|
key={'nav' + i}
|
||||||
i !== this.state.presentedIndex
|
shouldUpdate={shouldRenderScene}>
|
||||||
)}>
|
{scene}
|
||||||
<NavigatorStaticContextContainer
|
</NavigatorStaticContextContainer>
|
||||||
navigatorContext={sceneNavigatorContext}
|
|
||||||
key={'nav' + i}
|
|
||||||
shouldUpdate={shouldRenderScene}>
|
|
||||||
{scene}
|
|
||||||
</NavigatorStaticContextContainer>
|
|
||||||
</View>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1202,6 +1196,9 @@ var Navigator = React.createClass({
|
|||||||
<View
|
<View
|
||||||
key={this.state.idStack[i]}
|
key={this.state.idStack[i]}
|
||||||
ref={'scene_' + i}
|
ref={'scene_' + i}
|
||||||
|
onStartShouldSetResponderCapture={() => {
|
||||||
|
return i !== this.state.presentedIndex;
|
||||||
|
}}
|
||||||
style={[initialSceneStyle, this.props.sceneStyle]}>
|
style={[initialSceneStyle, this.props.sceneStyle]}>
|
||||||
{React.cloneElement(child, {
|
{React.cloneElement(child, {
|
||||||
ref: this._handleItemRef.bind(null, this.state.idStack[i]),
|
ref: this._handleItemRef.bind(null, this.state.idStack[i]),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user