From 4e5d575d63f36ead70f706a59f01bc469e366268 Mon Sep 17 00:00:00 2001 From: Martin Backschat Date: Thu, 7 Jan 2016 18:26:39 +0100 Subject: [PATCH] Fix issue to allow page scrolling again on iOS See https://github.com/cjpearson/cordova-plugin-keyboard/issues/14 --- src/ios/CDVKeyboard.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ios/CDVKeyboard.m b/src/ios/CDVKeyboard.m index ff01484..d8dde57 100644 --- a/src/ios/CDVKeyboard.m +++ b/src/ios/CDVKeyboard.m @@ -194,8 +194,12 @@ - (void)shrinkViewKeyboardWillChangeFrame:(NSNotification*)notif - (void)scrollViewDidScroll:(UIScrollView*)scrollView { - if (_shrinkView) { - scrollView.bounds = self.webView.bounds; + if (_shrinkView && _keyboardIsVisible) { + CGFloat maxY = scrollView.contentSize.height - scrollView.bounds.size.height; + if (scrollView.bounds.origin.y > maxY) { + scrollView.bounds = CGRectMake(scrollView.bounds.origin.x, maxY, + scrollView.bounds.size.width, scrollView.bounds.size.height); + } } }