You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/04/19 00:18:48 UTC
git commit: CB-5516 - (regression fix) Resize webView to handle
orientation change when keyboard (closes #8)
Repository: cordova-plugins
Updated Branches:
refs/heads/master f543672d0 -> 178658b1e
CB-5516 - (regression fix) Resize webView to handle orientation change when keyboard (closes #8)
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/178658b1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/178658b1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/178658b1
Branch: refs/heads/master
Commit: 178658b1e9dd8c027ea640bc288d90863034d857
Parents: f543672
Author: Gene Connolly <co...@gmail.com>
Authored: Fri Mar 28 12:51:14 2014 -0400
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Apr 18 15:18:38 2014 -0700
----------------------------------------------------------------------
keyboard/src/ios/CDVKeyboard.m | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/178658b1/keyboard/src/ios/CDVKeyboard.m
----------------------------------------------------------------------
diff --git a/keyboard/src/ios/CDVKeyboard.m b/keyboard/src/ios/CDVKeyboard.m
index e2ce6ff..705b6c5 100644
--- a/keyboard/src/ios/CDVKeyboard.m
+++ b/keyboard/src/ios/CDVKeyboard.m
@@ -293,6 +293,9 @@
keyboardFrame = [self.viewController.view convertRect:keyboardFrame fromView:nil];
CGRect newFrame = _savedWebViewFrame;
+ newFrame.size.width = self.viewController.view.bounds.size.width - _savedWebViewFrame.origin.x;
+ newFrame.size.height = self.viewController.view.bounds.size.height - _savedWebViewFrame.origin.y;
+
self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
self.webView.frame = newFrame;
}