summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2020-06-11 23:10:36 -1000
committerSam Bingner <sam@bingner.com>2020-06-11 23:10:36 -1000
commit8f7c00e36fcf243bcef3b833bbdd6bc63c9b8469 (patch)
treee0d8fe4780649d1dd2f799793cca8ccb068194a1
parent9f14c7183ba72db91bab6a8097a6091cdecef305 (diff)
This also sometimes caused iOS13 crashesv1.1.35
-rw-r--r--CyteKit/WebView.mm5
1 files changed, 5 insertions, 0 deletions
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, "@@");
}
}