Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-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 ED65210A9C for ; Fri, 20 Sep 2013 15:11:35 +0000 (UTC) Received: (qmail 74605 invoked by uid 500); 20 Sep 2013 15:11:34 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 74583 invoked by uid 500); 20 Sep 2013 15:11:33 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 74573 invoked by uid 99); 20 Sep 2013 15:11:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Sep 2013 15:11:32 +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 (athena.apache.org: domain of cosmacol@gmail.com designates 209.85.223.174 as permitted sender) Received: from [209.85.223.174] (HELO mail-ie0-f174.google.com) (209.85.223.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Sep 2013 15:11:27 +0000 Received: by mail-ie0-f174.google.com with SMTP id u16so1085715iet.19 for ; Fri, 20 Sep 2013 08:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=vBHczabGOV9rSh29qIntPg50ON+0ZqFrrzDYHyktyTE=; b=S73CFZxesEeAi9eY+cPpwK7Gxs595os5bBVs7yJfxwAzS6FoU6kBoHfFzHIx3NGc5Y uoKC5gigPkGzN4Laouzd+Z0SoZjmJ190EFF4mwO0n998PGBK6Cr+Nl8ntAXG5lGNKGrv wJqXULHkU8A1Lkf1PdAIIr0sdypja/QRG21JYrKqoibkY+sRq7cZxMEzYrVvmGiahhM5 NiILAJMb12N6nY/YjghZqcq/1aKP/YaiHmkgzt0NFqhZUMwyICKL1dgovC1at6PQxZe6 frDtuG7CJT05Z6eL6YSgEqoEQnsHaCdGDrA0MTAG7imvlYAS1Za4sqVrcU3xIdvNqMp5 RuAQ== X-Received: by 10.43.169.130 with SMTP id nm2mr959143icc.61.1379689866816; Fri, 20 Sep 2013 08:11:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.251.37 with HTTP; Fri, 20 Sep 2013 08:10:46 -0700 (PDT) In-Reply-To: References: From: Cosma Colanicchia Date: Fri, 20 Sep 2013 17:10:46 +0200 Message-ID: Subject: Re: FocusManager issue with sparse focus groups To: Apache Flex Developers ML Content-Type: multipart/alternative; boundary=001a11c2fac06976df04e6d214fa X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2fac06976df04e6d214fa Content-Type: text/plain; charset=UTF-8 This is the simplest way to reproduce it: [X] choice A [text input (maybe enabled when choice A is selected, to enter further info)] [ ] choice B [other controls] In this situation, when tab goes like this: choice A -> text input -> choice A -> .... (no way to reach other controls). This is because focus manager, focusing away from the text input, find choice B, see that is part of a group, and move focus to selected element of the group, even if it is actually *before* the current focus. IMO, it should check for this condition. 2013/9/20 Cosma Colanicchia > Absolutely, but if there are other controls "interleaved" with the radio > buttons of the same group, when the focus leave this interleaved components > the focus is "moved back" to the selected button... even if this is > "before" in the computed tab loop, actually creating a closed tab loop that > is impossible to escape without using the mouse. > > > > > 2013/9/20 Alex Harui > >> The default behavior on Windows is/was that you tab to a group of radio >> buttons which will focus the selected one or the first one if none are >> selected, then use arrow keys to move between them. Another tab moves you >> to the next/previous control or group. >> >> The Flex FocusManager attempts to replicate that behavior. Is that what >> you are seeing? >> >> -Alex >> >> On 9/20/13 7:08 AM, "Cosma Colanicchia" wrote: >> >> >Hi list, maybe I found an issue with keyobard focus manager. >> >I have a situation like this (hope you get the pic): >> > >> > >> >[previous controls] >> >[radio A] [radio B] >> > [radio A1] [radio B1] [text input] >> > [radio A2] [radio B2] >> >[next controls] >> > >> > >> >Now, the tab focus management is completely broken: >> > - when focus is on [radio A2], tab go back to [radio A] - there's no way >> >to move to [next controls] >> > - when focus is on [text input], tab go back to [radio B1] - again, no >> >way >> >to move to [next controls] >> > >> > >> >I think that the bug is in the FocusManager.getIndexOfNextObject method: >> >when focus is on [radio A2], the next focus candidate is [radio B] (due >> to >> >containers visual layout), but it is part of a focus group, so the >> >FocusManager bring it to *the selected element of its focus group*, that >> >is >> >[radio A]. >> > >> >In my opinion, this should be done only if no other elements of the >> >same focus group have an index, in the focus candidate list, that is less >> >then the index of the current focused component, to avoid "moving back" >> >the >> >focus and creating closed tab loops (maybe reversing the index check when >> >moving focus backwards). >> > >> > >> > >> >The only workaround I found so far is structuring the containers so that >> >component belonging to the same focus group are kept adjacent, but it is >> >very difficult (if not impossible) to achieve the same visual output >> (e.g. >> >put [radioA] and [radioB] in a dedicated HGroup, ditto for [radio B1] and >> >[radio B2], trying to keep [text input] aligned to [radio B1] someway). >> > >> >Any thoughts on this? If I'm not missing something obvious, I'd like to >> >file an issue... >> >> > --001a11c2fac06976df04e6d214fa--