Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A79A61065D for ; Fri, 20 Sep 2013 12:45:56 +0000 (UTC) Received: (qmail 36167 invoked by uid 500); 20 Sep 2013 12:45:55 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 36137 invoked by uid 500); 20 Sep 2013 12:45:55 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 36077 invoked by uid 99); 20 Sep 2013 12:45:55 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Sep 2013 12:45:55 +0000 Date: Fri, 20 Sep 2013 12:45:55 +0000 (UTC) From: "Chris Emerson (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CB-3020) HideKeyboardFormAccessoryBar and KeyboardShrinksView show white bar instead of removing it MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-3020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13772949#comment-13772949 ] Chris Emerson edited comment on CB-3020 at 9/20/13 12:45 PM: ------------------------------------------------------------- Hey guys - I'm using (and need) the following to work: . I tried the above stuff and something a guy put here: https://github.com/cpojer/cordova-ios/commit/883ebf049bfd6a4a2b210f69b7b6bab229269eff but nothing got things working for me. By "working" I mean I *DON'T* want the keyboard to shrink my view when it appears ... which is what I need 99.5% of the time. I think I have a working (hack) fix if anyone wants to try/test. All I did was comment out the first 3 lines of the keyboardWillShowOrHide method - after doing that the keyboard stopped shrinking my view - Yay! If anyone tests/confirms the same on their end please let me know. Update 1: I had some iPad issues so I updated my getting-uglier-by-the-minute hack a bit: {code:title=CDVViewController.m} - (void)keyboardWillShowOrHide:(NSNotification*)notif { // Ignore this conditional statement and just assume KeyboardShrinksView=true // if (![@"true" isEqualToString :[self settingForKey:@"KeyboardShrinksView"]]) { // return; // } BOOL showEvent = [notif.name isEqualToString:UIKeyboardWillShowNotification]; CGRect keyboardFrame = [notif.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; keyboardFrame = [self.view convertRect:keyboardFrame fromView:nil]; CGRect newFrame = self.view.bounds; if (showEvent) { // Add, don't subtract, the keyboard height to webview frame // newFrame.size.height -= keyboardFrame.size.height; newFrame.size.height += keyboardFrame.size.height; // don't allow frame height to exceed 1024 (iPad) if(newFrame.size.height > 1024) newFrame.size.height = 1024; self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, -keyboardFrame.size.height, 0); } else { self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); } // NSLog(@"running keyboardWillShowOrHide() [frame height:%f] [kb:%f]",newFrame.size.height, keyboardFrame.size.height); self.webView.frame = newFrame; } {code} was (Author: chrisemersonnc): Hey guys - I'm using (and need) the following to work: . I tried the above stuff and something a guy put here: https://github.com/cpojer/cordova-ios/commit/883ebf049bfd6a4a2b210f69b7b6bab229269eff but nothing got things working for me. By "working" I mean I *DON'T* want the keyboard to shrink my view when it appears ... which is what I need 99.5% of the time. I think I have a working (hack) fix if anyone wants to try/test. All I did was comment out the first 3 lines of the keyboardWillShowOrHide method - after doing that the keyboard stopped shrinking my view - Yay! If anyone tests/confirms the same on their end please let me know. Update 1: I had some iPad issues w/my hack to I updated my getting-uglier-by-the-minute hack a bit: {code:title=CDVViewController.m} - (void)keyboardWillShowOrHide:(NSNotification*)notif { // Ignore this conditional statement and just assume KeyboardShrinksView=true // if (![@"true" isEqualToString :[self settingForKey:@"KeyboardShrinksView"]]) { // return; // } BOOL showEvent = [notif.name isEqualToString:UIKeyboardWillShowNotification]; CGRect keyboardFrame = [notif.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; keyboardFrame = [self.view convertRect:keyboardFrame fromView:nil]; CGRect newFrame = self.view.bounds; if (showEvent) { // Add, don't subtract, the keyboard height to webview frame // newFrame.size.height -= keyboardFrame.size.height; newFrame.size.height += keyboardFrame.size.height; // don't allow frame height to exceed 1024 (iPad) if(newFrame.size.height > 1024) newFrame.size.height = 1024; self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, -keyboardFrame.size.height, 0); } else { self.webView.scrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); } // NSLog(@"running keyboardWillShowOrHide() [frame height:%f] [kb:%f]",newFrame.size.height, keyboardFrame.size.height); self.webView.frame = newFrame; } {code} > HideKeyboardFormAccessoryBar and KeyboardShrinksView show white bar instead of removing it > ------------------------------------------------------------------------------------------ > > Key: CB-3020 > URL: https://issues.apache.org/jira/browse/CB-3020 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Affects Versions: 2.6.0, 3.0.0 > Environment: ios 6.1.3 > Reporter: Horst Perfect > Assignee: Shazron Abdullah > Priority: Minor > Labels: bug, ios, ios6.1.3 > > I use phonegap 2.6 with the two new preferences HideKeyboardFormAccessoryBar KeyboardShrinksView set to true. Instead of the AccessoryBar a white bar appears ([screenshot|http://i.stack.imgur.com/3fgV8.png]). > This is just happening when i set *both* of the preferences to true. When i just set the AccessoryBar preference to true the bar disappears as planned. > Horst -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira