Skip to content

Commit 7412340

Browse files
javachefacebook-github-bot
authored andcommitted
Fix passThroughTouches
Reviewed By: mmmulani Differential Revision: D4438390 fbshipit-source-id: 4e1ec4eaf80ffb48ac7b65ed092402c51d9227d3
1 parent 88eeea0 commit 7412340

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Libraries/ReactNative/AppContainer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ class AppContainer extends React.Component {
8989
}
9090

9191
return (
92-
<View style={styles.appContainer}>
92+
<View style={styles.appContainer} pointerEvents="box-none">
9393
<View
9494
collapsable={!this.state.inspector}
9595
key={this.state.mainKey}
96+
pointerEvents="box-none"
9697
style={styles.appContainer} ref={(ref) => {this._mainRef = ref;}}>
9798
{this.props.children}
9899
</View>

React/Base/RCTRootView.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ @implementation RCTRootView
5858
NSString *_moduleName;
5959
NSDictionary *_launchOptions;
6060
RCTRootContentView *_contentView;
61+
62+
BOOL _passThroughTouches;
6163
}
6264

6365
- (instancetype)initWithBridge:(RCTBridge *)bridge
@@ -154,6 +156,7 @@ - (BOOL)passThroughTouches
154156

155157
- (void)setPassThroughTouches:(BOOL)passThroughTouches
156158
{
159+
_passThroughTouches = passThroughTouches;
157160
_contentView.passThroughTouches = passThroughTouches;
158161
}
159162

@@ -253,6 +256,7 @@ - (void)bundleFinishedLoading:(RCTBridge *)bridge
253256
[self runApplication:bridge];
254257

255258
_contentView.backgroundColor = self.backgroundColor;
259+
_contentView.passThroughTouches = _passThroughTouches;
256260
[self insertSubview:_contentView atIndex:0];
257261

258262
if (_sizeFlexibility == RCTRootViewSizeFlexibilityNone) {

0 commit comments

Comments
 (0)