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 6F42210BEB for ; Thu, 14 Nov 2013 21:19:22 +0000 (UTC) Received: (qmail 18006 invoked by uid 500); 14 Nov 2013 21:19:22 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 17973 invoked by uid 500); 14 Nov 2013 21:19:22 -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 17907 invoked by uid 99); 14 Nov 2013 21:19:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 21:19:22 +0000 Date: Thu, 14 Nov 2013 21:19:22 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-5373) CDVViewController does not support shifted UIWebView with HideKeyboardFormAccessoryBar 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-5373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13822932#comment-13822932 ] ASF subversion and git services commented on CB-5373: ----------------------------------------------------- Commit e1b942e60d3ad01ba48224f1d51595c3ad2e322b in branch refs/heads/master from [~agrieve] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugins.git;h=e1b942e ] CB-5373 Fix HideKeyboardFormAccessoryBar work when UIWebView is not at (0,0) > CDVViewController does not support shifted UIWebView with HideKeyboardFormAccessoryBar > -------------------------------------------------------------------------------------- > > Key: CB-5373 > URL: https://issues.apache.org/jira/browse/CB-5373 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Affects Versions: 3.1.0 > Reporter: Mike Kwan > Attachments: Screen Shot 2013-11-13 at 12.22.08.png, ios.zip > > > *CDVViewController* does not play well with the *HideKeyboardFormAccessoryBar* set to *true* when the *UIWebView* has its origin shifted. > To reproduce this: > - Create skeleton project via CLI > - Configure *content src* to *http://www.google.co.uk/* > - Configure *HideKeyboardFormAccessoryBar* to *true* > - In the MainViewController add the following method: > {code}- (void)viewDidLoad > { > [super viewDidLoad]; > > CGRect frame = [[self view] bounds]; > frame.origin.y += 20; > frame.size.height -= 20; > > [self.webView setFrame:frame]; > }{code} > - Load page, trigger keyboard by giving focus to the input field and dismiss the keyboard by tapping back on the page > The reason the bug occurs is because of the following line in *CDVViewController* in *hideKeyboardFormAccessoryBarEnd:*: > {code}self.webView.scrollView.frame = self.webView.frame;{code} > This will work as expected only if the *scrollView* origin matches the *UIWebView* origin which happens only at (0, 0). The correct code should be: > {code}self.webView.scrollView.frame = CGRectMake(0, 0, self.webView.frame.size.width, self.webView.frame.size.height);{code} > An example of the *scrollView* frame being set incorrectly: > !https://issues.apache.org/jira/secure/attachment/12613590/Screen%20Shot%202013-11-13%20at%2012.22.08.png! > Minimal example reproducing bug is attached. -- This message was sent by Atlassian JIRA (v6.1#6144)