On iPad Pro and iPad Air models, overlays with interceptTouchOutside: false do not work as expected as they actually absorb all the touch events. This is strange because it does not happen on normal iPhones or even the standard iPad's (6th generation).
Similar closed issues:
Fork with reproducible example: https://github.com/ItsNoHax/react-native-navigation/tree/reproduce-invisible-overlay
Steps:
Same for me
@guyca any updates on this issue?
Thanks
Hi,
A possible hint for solving this issue, if you go to file RNNOverlayWindow.m and take a look at this method:
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *hitTestResult = [super hitTest:point withEvent:event];
if ([hitTestResult isKindOfClass:[UIWindow class]]) {
return nil;
}
return hitTestResult;
}
There is some view added in the middle for iPad, I have checked all the code and doesn't seem to be anything conditional for iPad, a workaround for solving this issue temporarily is this:
@implementation RNNOverlayWindow
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *hitTestResult = [super hitTest:point withEvent:event];
if ([hitTestResult isKindOfClass:[UIWindow class]]) {
return nil;
}
if ([[hitTestResult class] isEqual:[UIView class]]) { <===== Added this
return nil;
}
return hitTestResult;
}
@end
And it works on iOS 13 because what we really want to intercept is RCTViews not pure UIViews in my opinion
Nice find @fjmorant , hopefully @yogevbd can use this to propose a fix.
Great finds guys.. 馃憦
@yogevbd Seems like this has been lost in V5 version. Going to re-open the issue.
This also appears to be an issue on all iOS devices, not just on iPads. V6.3.1
You can see a video of the replication here: https://d.pr/v/My6YCg
@yogevbd as no-one seems to be seeing this issue. The iPad fix issued doesn't resolve.
Hey @flikQ ! 馃憢 If you could fork the library and push a reproduction to the issue to your clone, that would help us a lot debug this issue.
Most helpful comment
Great finds guys.. 馃憦