Skip to content

Commit

Permalink
Fix scroller resizing bug cjpearson#55
Browse files Browse the repository at this point in the history
  • Loading branch information
ccorcos committed Jul 25, 2017
1 parent c38186f commit cf6d21c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ios/CDVKeyboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit cf6d21c

Please sign in to comment.