From cf6d21c782ea2aa04e13883b35ea6c44132531e2 Mon Sep 17 00:00:00 2001 From: Chet Corcos Date: Tue, 25 Jul 2017 16:06:21 -0700 Subject: [PATCH] Fix scroller resizing bug https://github.com/cjpearson/cordova-plugin-keyboard/issues/55 --- src/ios/CDVKeyboard.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ios/CDVKeyboard.m b/src/ios/CDVKeyboard.m index 9e40179..01246ce 100644 --- a/src/ios/CDVKeyboard.m +++ b/src/ios/CDVKeyboard.m @@ -148,8 +148,7 @@ - (void)setShrinkView:(BOOL)shrinkView // They removed this behavior is iOS 10, but for 8 and 9 we need to prevent the webview from listening on keyboard events // Even if you later set shrinkView to false, the observers will not be added back NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; - if ([self.webView isKindOfClass:NSClassFromString(@"WKWebView")] - && ![[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){.majorVersion = 10, .minorVersion = 0, .patchVersion = 0 }]) { + if ([self.webView isKindOfClass:NSClassFromString(@"WKWebView")]) { [nc removeObserver:self.webView name:UIKeyboardWillHideNotification object:nil]; [nc removeObserver:self.webView name:UIKeyboardWillShowNotification object:nil]; [nc removeObserver:self.webView name:UIKeyboardWillChangeFrameNotification object:nil];