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 2013/12/05 01:41:57 UTC

git commit: CB-5516 - iOS - StatusBar Plugin breaks with Keyboard Plugin ShrinksView enabled and text box selected

Updated Branches:
  refs/heads/master 07cabc3be -> 17bdd5fe6


CB-5516 - iOS - StatusBar Plugin breaks with Keyboard Plugin ShrinksView enabled and text box selected


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/17bdd5fe
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/17bdd5fe
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/17bdd5fe

Branch: refs/heads/master
Commit: 17bdd5fe62d7a851c3c9a3e29f8483d4188c504b
Parents: 07cabc3
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Dec 4 16:29:52 2013 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Dec 4 16:29:52 2013 -0800

----------------------------------------------------------------------
 keyboard/plugin.xml            | 2 +-
 keyboard/src/ios/CDVKeyboard.h | 2 ++
 keyboard/src/ios/CDVKeyboard.m | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/17bdd5fe/keyboard/plugin.xml
----------------------------------------------------------------------
diff --git a/keyboard/plugin.xml b/keyboard/plugin.xml
index f7a29cc..492cb34 100644
--- a/keyboard/plugin.xml
+++ b/keyboard/plugin.xml
@@ -4,7 +4,7 @@
     xmlns:rim="http://www.blackberry.com/ns/widgets"
     xmlns:android="http://schemas.android.com/apk/res/android"
     id="org.apache.cordova.keyboard"
-    version="0.1.1">
+    version="0.1.2">
     <name>Keyboard</name>
     <description>Cordova Keyboard Plugin</description>
     <license>Apache 2.0</license>

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/17bdd5fe/keyboard/src/ios/CDVKeyboard.h
----------------------------------------------------------------------
diff --git a/keyboard/src/ios/CDVKeyboard.h b/keyboard/src/ios/CDVKeyboard.h
index dca1fb5..9898f7a 100644
--- a/keyboard/src/ios/CDVKeyboard.h
+++ b/keyboard/src/ios/CDVKeyboard.h
@@ -21,6 +21,8 @@
 
 @interface CDVKeyboard : CDVPlugin {
     @protected
+    CGRect _savedWebViewFrame;
+    @protected
     BOOL _shrinkView;
     @protected
     BOOL _hideFormAccessoryBar;

http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/17bdd5fe/keyboard/src/ios/CDVKeyboard.m
----------------------------------------------------------------------
diff --git a/keyboard/src/ios/CDVKeyboard.m b/keyboard/src/ios/CDVKeyboard.m
index c0d8386..c2a6fe9 100644
--- a/keyboard/src/ios/CDVKeyboard.m
+++ b/keyboard/src/ios/CDVKeyboard.m
@@ -238,11 +238,12 @@
     if (!_shrinkView) {
         return;
     }
+    _savedWebViewFrame = self.webView.frame;
 
     CGRect keyboardFrame = [notif.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
     keyboardFrame = [self.viewController.view convertRect:keyboardFrame fromView:nil];
 
-    CGRect newFrame = self.viewController.view.bounds;
+    CGRect newFrame = _savedWebViewFrame;
     CGFloat actualKeyboardHeight = (keyboardFrame.size.height - _accessoryBarHeight);
     newFrame.size.height -= actualKeyboardHeight;
 
@@ -261,7 +262,7 @@
     CGRect keyboardFrame = [notif.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
     keyboardFrame = [self.viewController.view convertRect:keyboardFrame fromView:nil];
 
-    CGRect newFrame = self.viewController.view.bounds;
+    CGRect newFrame = _savedWebViewFrame;
     self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
     self.webView.frame = newFrame;
 }