Fix passThroughTouches

Reviewed By: mmmulani

Differential Revision: D4438390

fbshipit-source-id: 4e1ec4eaf80ffb48ac7b65ed092402c51d9227d3
This commit is contained in:
Pieter De Baets 2017-01-23 11:22:39 -08:00 committed by Facebook Github Bot
parent 88eeea0995
commit 7412340175
2 changed files with 6 additions and 1 deletions

View File

@ -89,10 +89,11 @@ class AppContainer extends React.Component {
}
return (
<View style={styles.appContainer}>
<View style={styles.appContainer} pointerEvents="box-none">
<View
collapsable={!this.state.inspector}
key={this.state.mainKey}
pointerEvents="box-none"
style={styles.appContainer} ref={(ref) => {this._mainRef = ref;}}>
{this.props.children}
</View>

View File

@ -58,6 +58,8 @@ NSString *const RCTContentDidAppearNotification = @"RCTContentDidAppearNotificat
NSString *_moduleName;
NSDictionary *_launchOptions;
RCTRootContentView *_contentView;
BOOL _passThroughTouches;
}
- (instancetype)initWithBridge:(RCTBridge *)bridge
@ -154,6 +156,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
- (void)setPassThroughTouches:(BOOL)passThroughTouches
{
_passThroughTouches = passThroughTouches;
_contentView.passThroughTouches = passThroughTouches;
}
@ -253,6 +256,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
[self runApplication:bridge];
_contentView.backgroundColor = self.backgroundColor;
_contentView.passThroughTouches = _passThroughTouches;
[self insertSubview:_contentView atIndex:0];
if (_sizeFlexibility == RCTRootViewSizeFlexibilityNone) {