From 8f7c00e36fcf243bcef3b833bbdd6bc63c9b8469 Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Thu, 11 Jun 2020 23:10:36 -1000 Subject: This also sometimes caused iOS13 crashes --- CyteKit/WebView.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CyteKit/WebView.mm b/CyteKit/WebView.mm index 92583f7..2ce14ec 100644 --- a/CyteKit/WebView.mm +++ b/CyteKit/WebView.mm @@ -409,6 +409,10 @@ static BOOL $WAKView$canBecomeFocused(id self) { return true; } +static id $WAKView$parentFocusEnvironment(id self) { + return nil; +} + __attribute__((__constructor__)) static void $() { if (Class $UIWebViewWebViewDelegate = objc_getClass("UIWebViewWebViewDelegate")) { class_addMethod($UIWebViewWebViewDelegate, @selector(webView:addMessageToConsole:), (IMP) &$UIWebViewWebViewDelegate$webView$addMessageToConsole$, "v16@0:4@8@12"); @@ -423,6 +427,7 @@ __attribute__((__constructor__)) static void $() { if (Class $WAKView = objc_getClass("WAKView")) { // iOS13 Crashes calling this for unknown reasons when Accessibility->Keyboards->Full Keybaord Access is enabled class_addMethod($WAKView, @selector(canBecomeFocused), (IMP) &$WAKView$canBecomeFocused, "c@"); + class_addMethod($WAKView, @selector(parentFocusEnvironment), (IMP) &$WAKView$parentFocusEnvironment, "@@"); } } -- cgit v1.2.3