Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 1FA65200C63 for ; Thu, 11 May 2017 18:42:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1E31B160BB3; Thu, 11 May 2017 16:42:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3D8F7160BC7 for ; Thu, 11 May 2017 18:42:27 +0200 (CEST) Received: (qmail 81824 invoked by uid 500); 11 May 2017 16:42:21 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 81812 invoked by uid 99); 11 May 2017 16:42:21 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 May 2017 16:42:21 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 741C8C1817 for ; Thu, 11 May 2017 16:42:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ESeTxGdFumbb for ; Thu, 11 May 2017 16:42:18 +0000 (UTC) Received: from mail-yw0-f177.google.com (mail-yw0-f177.google.com [209.85.161.177]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 793E15F398 for ; Thu, 11 May 2017 16:42:18 +0000 (UTC) Received: by mail-yw0-f177.google.com with SMTP id l135so15468824ywb.2 for ; Thu, 11 May 2017 09:42:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=pud5F2ojEpMvf7k7ez/QQ4VzfrJizghg1sTwXPm0URI=; b=KcFwHmoeTjyGb0VEc0nGah86imlCtRqdgkUWIn9nIwnpLFNOsvZsjljGKtkyleNL4k RDlKb1/zbab2Y0iXyHT/pJh9sIF6Y183jByE70Nn1Tzuxd/Z+6J/fZYVK4BssPvGo8O1 tzWscmc/hF6v5FZNpZlTzg2OUXoJeGKTXSsPlZmLXy9oqyI+Z3AhpRbIl5hncFfLy6g4 S7aHPh798PhD289fkRPUZKdtpzRh8mLk8WsyGaXR8m3ESpf9KBVQvhBBmQp29bfeCtrT LTTg4WWJ6MiJ76QxI+I9foUq3+YNp4FaAfMLoOKlSNiPeko1kXhEOHciOjKsZIkL6Uw1 cMjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=pud5F2ojEpMvf7k7ez/QQ4VzfrJizghg1sTwXPm0URI=; b=r3LkzP+IJyx8lEfXxxaH/et5bR55P8RXNdv61EgTwshXR8XBKumWrB+aercwTJx7UC pRM/oc1NL8t00TMmEEyf5QNjQBiF3dFHodJORiJwzYslLcFr/nNABb8JKIIWUEfPwGT1 O2xQHW6GL+tShmOMm/ykuDB2diaZoDQjVVYenZHgz1aMzuAR+iUCj/sCW+eUtSJWOoKa QAFNwdd6TW/2xgufQJ1z93dEpYEFuC+G/9so1gGeLCJwJSJZCs/UwRynISXBQ/vpJR18 aXAL5Ivd4e+XU0Vv5SZiwgPWbisrZQ5/tcR1q8awLJ5az0sREYkQk/MeQnCcL2vJ6ti6 kZFA== X-Gm-Message-State: AODbwcAhToVauX0iUcQstruNoVGjTDKX8hUXhXck/xCxC3QWXjEtqshy q1fQZOdC770lekc/ehv7rP5XvobqSHCE X-Received: by 10.129.121.197 with SMTP id u188mr41903ywc.288.1494520937705; Thu, 11 May 2017 09:42:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.74.130 with HTTP; Thu, 11 May 2017 09:42:17 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Fr=C3=A9deric_Cox?= Date: Thu, 11 May 2017 18:42:17 +0200 Message-ID: Subject: Re: TextInput bug with soft keyboard (mobile) To: users@flex.apache.org Content-Type: multipart/related; boundary=94eb2c0a6f269a33e0054f424569 archived-at: Thu, 11 May 2017 16:42:28 -0000 --94eb2c0a6f269a33e0054f424569 Content-Type: multipart/alternative; boundary=94eb2c0a6f269a33dd054f424568 --94eb2c0a6f269a33dd054f424568 Content-Type: text/plain; charset=UTF-8 Which skin are you using for the TextInput? The default spark textinput skin? The mobile textinput skin? Or ScrollingStageTextInput ? On Thu, May 11, 2017 at 5:20 PM, Erik J. Thomas wrote: > I spent the better part of a day trying to solve for an annoying user > experience with TextInput on mobile devices (Apple). > > If a TextInput or TextArea input field is located in the top 50% of the > display area, and a setFocus() call on the input field is made, the soft > keyboard displays and the input cursor is visible (all is well). But *if > the input field is where it would be obscured by the soft keyboard (lower > half of the display), Flex moves the content up so the input field is > visible (nice feature), but the input cursor disappears.* > > I have tried many workarounds, all failing: > > > - Using callLater to call a function that sets the input focus a > second time. > - Listening for soft keyboard events and then setting input focus > again. > - Setting kludge timer to wait after the soft keyboard is activated > and set focus to the control again after waiting a variety of different > durations. > > > My latest idea is to try scrolling the content up myself so I know the > input field is visible BEFORE setting focus so the input cursor will always > be visible, but operations on the scroller don't give me the ability to > place the input field exactly above the soft keyboard. *Before I go down > the road of firing an event from the ItemRenderer that the parent view with > the scroller can react to I wondered if there is a known solution that's > less work.* > > Anyone found a good workaround for this obvious bug in Flex (or perhaps > AIR)? BTW, I ran into this bug the first time about 5 years ago and worked > around it by placing input fields in the top 50% of the display area, but > in this case, my content is scrolling so I cannot do that. I was surprised > to see this bug has never been fixed. > > For more detail read on... > > My design is a Facebook-ish social app (for one view) with scrolling > content: > > > > > When the user taps Comment and the input field is in the lower half of the > device's display area, Flex moves the content up enough for the input field > to be visible above the soft keyboard, but the input cursor never displays: > > > Thanks so much for your suggestions! > > Erik > > > > > --94eb2c0a6f269a33dd054f424568 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Which skin are you using for the TextInput? The default sp= ark textinput skin? The mobile textinput skin? Or ScrollingStageTextInput ?=

On Thu, May= 11, 2017 at 5:20 PM, Erik J. Thomas <erik@linqto.com> wrote:<= br>
I spe= nt the better part of a day trying to solve for an annoying user experience= with TextInput on mobile devices (Apple).=C2=A0

If = a TextInput or TextArea input field is located in the top 50% of the displa= y area, and a setFocus() call on the input field is made, the soft keyboard= displays and the input cursor is visible (all is well). But if the inpu= t field is where it would be obscured by the soft keyboard (lower half of t= he display), Flex moves the content up so the input field is visible (nice = feature), but the input cursor disappears.

I h= ave tried many workarounds, all failing:

  • Using callLater to call a functi= on that sets the input focus a second time.
  • Listening for soft keyb= oard events and then setting input focus again.
  • Setting kludge time= r to wait after the soft keyboard is activated and set focus to the control= again after waiting a variety of different durations.

My latest idea is to try scrolling the content up myself so I know= the input field is visible BEFORE setting focus so the input cursor will a= lways be visible, but operations on the scroller don't give me the abil= ity to place the input field exactly above the soft keyboard. Before I g= o down the road of firing an event from the ItemRenderer that the parent vi= ew with the scroller can react to I wondered if there is a known solution t= hat's less work.

Anyone found a good worka= round for this obvious bug in Flex (or perhaps AIR)? BTW, I ran into this b= ug the first time about 5 years ago and worked around it by placing input f= ields in the top 50% of the display area, but in this case, my content is s= crolling so I cannot do that. I was surprised to see this bug has never bee= n fixed.

For more detail read on...

=
My design is a Facebook-ish social app (for one view) with scrol= ling content:




When the user taps Comment and the input field is in the lower = half of the device's display area, Flex moves the content up enough for= the input field to be visible above the soft keyboard, but the input curso= r never displays:


Thanks so much for your suggestions!=

Er= ik




=

--94eb2c0a6f269a33dd054f424568-- --94eb2c0a6f269a33e0054f424569--