Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 29BC417E4E for ; Tue, 31 Mar 2015 04:07:28 +0000 (UTC) Received: (qmail 45918 invoked by uid 500); 31 Mar 2015 04:07:27 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 45876 invoked by uid 500); 31 Mar 2015 04:07:27 -0000 Mailing-List: contact dev-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 dev@cordova.apache.org Received: (qmail 45864 invoked by uid 99); 31 Mar 2015 04:07:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2015 04:07:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kerrishotts@gmail.com designates 209.85.213.171 as permitted sender) Received: from [209.85.213.171] (HELO mail-ig0-f171.google.com) (209.85.213.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Mar 2015 04:07:01 +0000 Received: by igcxg11 with SMTP id xg11so7336370igc.0 for ; Mon, 30 Mar 2015 21:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type; bh=Eedfy5PdslL7EMQ4PvjUD3l6PebutEemTveviRZv/Vc=; b=QcQZbYjvofZAYjCmhsoludimhT2O2CkYPXnVNO4AWgYDcy1Nei0qacW23Cq/CQtEMw piK0sm+RokAoPRKO9T2Bh02Pi/eEM/7IJ946nmidLau4qvpGw+fLBRmzElHPjVQUdIJG dpXn5bMt1x+li0M81HKq8nvyqv8N1DJAtR5gOdFUmwMIZPwg5rf1mmAOWwXVBtLhwRmm 8fDHobsJKxvq7MhX62i1NHhCiB48f2jBKHWfMKlQFer5LCMvaONzW3ECQME/wWZWwxSk cmgL9toq3lobEGaJ810rCEW8SXTnkvNSl8v40LZ7OnJW0UKnfLrMNJj5jtpRtGqQjoqd FVcw== X-Received: by 10.42.82.199 with SMTP id e7mr64441889icl.18.1427774729198; Mon, 30 Mar 2015 21:05:29 -0700 (PDT) Received: from Kerris-MacBook-Pro.local ([50.45.7.234]) by mx.google.com with ESMTPSA id j126sm8906748ioe.22.2015.03.30.21.05.24 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Mar 2015 21:05:27 -0700 (PDT) Date: Mon, 30 Mar 2015 23:05:19 -0500 From: Kerri Shotts To: dev@cordova.apache.org Message-ID: In-Reply-To: References: Subject: Re: Keyboard plugin X-Mailer: Airmail Beta (298) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="551a1cff_327b23c6_592f" X-Virus-Checked: Checked by ClamAV on apache.org --551a1cff_327b23c6_592f Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I noticed this, actually, when working on one of my last books =E2=80=94 = the fix (or, hack, rather) was to install the plugin from a specific comm= it that didn=E2=80=99t bail if it thought iOS shrunk the view. It was fru= strating at the time, but I have since changed my opinion of KeyboardShin= ksView =3D true, on iOS anyway: that=E2=80=99s just not how most native a= pps on iOS work. Typically, the size of the view never changes when the keyboard appears =E2= =80=94 if you have a view with a tab bar at the bottom of the view and th= e keyboard pops up, the tab bar doesn=E2=80=99t animate upwards =E2=80=94= it stays behind the keyboard and never budges. Instead the content area = compensates by allowing additional scrolling. If you have a translucent k= eyboard (like from the home screen), this is most apparent (you can still= tell the content exists below the keyboard. So although convenient, it might also be why Apple removed this behavior = in later iOS versions: because it=E2=80=99s not the way native apps usual= ly behave. I=E2=80=99m exploring various options, but I=E2=80=99m getting the most n= ative behavior by using a combination of the ionic keyboard plugin with s= crolling disabled while the keyboard is visible. Because the height of th= e keyboard is passed to the event handler, I can then adjust the size of = any scroll containers (either by adding padding or by adjusting their hei= ghts). This was broken in an earlier version of the plugin (wrong heights= returned), but as of the current version of the plugin, the heights appe= ared to be reported correctly. It=E2=80=99s a bit more work on the dev=E2= =80=99s part, and the plugin doesn=E2=80=99t work perfectly in all cases = (having a hardware keyboard attached still returns an incorrect height). = But the feeling is so much closer to native. I=E2=80=99m working up some = examples that I=E2=80=99ll post soon that demonstrate how it works. So, my personal preference would be to keep this out of core =E2=80=94 if= a dev wants the shrinkView behavior, they can use a plugin that supports= it. =46rom:=C2=A0Andrew Grieve Reply:=C2=A0dev=40cordova.apache.org > Date:=C2=A0March 30, 2015 at 7:33:28 PM To:=C2=A0dev > Subject:=C2=A0 Re: Keyboard plugin =20 I definitely agree that KeyboardShrinksView makes a tonne more sense for = =20 apps (as opposed to webpages), and it's what we use on Android. Shame the= y =20 reversed the decision (I didn't actually realize that). =20 One reason to keep it as a plugin is that the logic seems to be hard to g= et =20 right and so needs to be tweaked frequently. Plugins let you iterate fast= er =20 than if it were built-in. =20 Still, I think we're hoping to reduce the number of plugins that we =20 maintain as a part of the core Cordova project, since we really don't do = a =20 great job at giving them the attention that they deserve (just have a loo= k =20 at all the unaddressed PRs against them). =20 One of the intended goals (at least IMO) of moving plugins to npm and =20 npm-style-naming, is to make less distinction between =22core=22 cordova = =20 plugins and community-maintained plugins, so that the higher-quality =20 community-maintained plugins get more usage. =20 Interested in what others think. =20 On Mon, Mar 30, 2015 at 1:07 PM, Connor Pearson wrot= e: =20 > Hi All, =20 > =20 > It's been a while since the keyboard plugin was discussed. As I underst= and =20 > it, the plugin was moved to Cordova labs after iOS 7 made =20 > KeyboardShrinksView the default behavior. Since iOS 7.1 and 8 have reve= rsed =20 > this decision, could we revisit this=3F =20 > =20 > I've done some work to re-enable KeyboardShrinksView for iOS > 7.0 and = fix =20 > some bugs, but is there any support for continuing to maintain this plu= gin=3F =20 > If not, is there any way to merge the KeyboardShrinksView preference ba= ck =20 > into cordova-ios=3F I think it's more commonly used and much more stabl= e than =20 > the HideKeyboard=46ormAccessoryBar preference. As a Cordova user, our a= pp =20 > depends on the shrink view behavior. Any thoughts=3F =20 > =20 > Thanks, =20 > Connor =20 > =20 --551a1cff_327b23c6_592f--