mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix touch handling in bridged paper components
Summary: Changelog: [internal] If view was bridged from Paper, hit testing would return Paper view which doesn't have reference to Fabric's event emitter. To fix this, if the bridged view is returned from hit testing, it is swapped with interop view which has reference to event emitter. Reviewed By: shergin Differential Revision: D23840054 fbshipit-source-id: d4aa4ee8da4e1da80d2e2b69b79ed82d726f04e3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
64ac01dbbe
commit
c907202d2b
+11
@@ -37,6 +37,17 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
|
||||
return self;
|
||||
}
|
||||
|
||||
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
|
||||
{
|
||||
UIView *result = [super hitTest:point withEvent:event];
|
||||
|
||||
if (result == _adapter.paperView) {
|
||||
return self;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
+ (NSMutableSet<NSString *> *)supportedViewManagers
|
||||
{
|
||||
static NSMutableSet<NSString *> *supported = [NSMutableSet setWithObjects:@"Picker",
|
||||
|
||||
Reference in New Issue
Block a user