You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2015/03/30 16:13:00 UTC
[6/6] cordova-plugins git commit: Remove animation. Fix issue with
forcing webview under status bar. (close #18)
Remove animation. Fix issue with forcing webview under status bar. (close #18)
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/58d253e1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/58d253e1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/58d253e1
Branch: refs/heads/master
Commit: 58d253e172d0f6352036183030afacdd7f46f56d
Parents: 7e30d8f
Author: Connor Pearson <cj...@gmail.com>
Authored: Fri Jan 23 14:01:12 2015 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Mon Mar 30 10:12:36 2015 -0400
----------------------------------------------------------------------
keyboard/src/ios/CDVKeyboard.m | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/58d253e1/keyboard/src/ios/CDVKeyboard.m
----------------------------------------------------------------------
diff --git a/keyboard/src/ios/CDVKeyboard.m b/keyboard/src/ios/CDVKeyboard.m
index e5cb068..f25e24a 100644
--- a/keyboard/src/ios/CDVKeyboard.m
+++ b/keyboard/src/ios/CDVKeyboard.m
@@ -255,7 +255,10 @@
self.webView.scrollView.scrollEnabled = YES;
- CGRect screen = [self.viewController.view convertRect:[[UIScreen mainScreen] applicationFrame] fromView:nil];
+ CGRect screen = self.webView.frame.origin.y > 0 ?
+ [self.viewController.view convertRect:[[UIScreen mainScreen] applicationFrame] fromView:nil]:
+ [self.viewController.view convertRect:[[UIScreen mainScreen] bounds] fromView:nil];
+
CGRect keyboard = [self.viewController.view convertRect: ((NSValue*)notif.userInfo[@"UIKeyboardFrameEndUserInfoKey"]).CGRectValue fromView: nil];
CGRect keyboardIntersection = CGRectIntersection(screen, keyboard);
@@ -269,13 +272,7 @@
self.webView.scrollView.scrollEnabled = !self.disableScrollingInShrinkView;
}
- __weak CDVKeyboard* weakSelf = self;
- [UIView animateWithDuration:[notif.userInfo[@"UIKeyboardAnimationDurationUserInfoKey"] doubleValue]
- delay:0.0
- options:[notif.userInfo[@"UIKeyboardAnimationCurveUserInfoKey"] integerValue] << 16
- animations:^{
- weakSelf.webView.frame = screen;
- }completion:nil];
+ self.webView.frame = screen;
}
// //////////////////////////////////////////////////
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org