See [1] for the method I was talking about...

https://github.com/apache/flex-sdk/blob/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as#L1336


2013/5/7 Cosma Colanicchia <cosma...@gmail.com>

> Thanks Alex.
>
> In my test I was never preventing it, but the tab focus movement to the
> next component was not worked (I expected to always move forward, at
> least): for some reason, the internal focus target was not part of the
> FocusManager tab loop candidates. I saw that, in this case, the
> FocusManager does a second pass on candidates and stops on the *first*
> candidate "owning" the current focused element, which works with simple UIs
> but often produce incorrect results (e.g. when the component is in an
> Accordion). Maybe the FocusManager could at least use the *last* owning
> candidate (thus narrowing the search towards the tree leaf), instead of the
> first one?
>
>
>
>
> 2013/5/7 Alex Harui <aha...@adobe.com>
>
>> That interface is, in fact, only for the initial assignment of focus to
>> the
>> component that wraps multiple targets.  That wrapping component must then
>> manage tab focus on its own by handling the keyFocusChange event and
>> calling
>> preventDefault on it when it wants to keep focus on one of the wrapped
>> controls.
>>
>> HTH,
>> -Alex
>>
>>
>> On 5/7/13 8:33 AM, "Cosma Colanicchia" <cosma...@gmail.com> wrote:
>>
>> > Anyone know something about this interface ([1] on github)?
>> >
>> > Its asdoc states "the IFocusManagerComplexComponent interface defines
>> the
>> > interface that components that can have more than one internal focus
>> target
>> > should implement in order to receive focus from the FocusManager" - so I
>> > tried to implement it this scenario, but it does not seem to work.
>> >
>> > In particular, the FocusManager implementation look for it when it must
>> > give focus to a component (see [2]), however tab focus management seems
>> > broken using it (I think that FocusManager should check if the current
>> > focus is on a component that is an "internal focus target" of a complex
>> one
>> > when looking it up in the tab loop, to correctly determine the next
>> focus
>> > manager component).
>> >
>> >
>> > [1]
>> >
>> https://github.com/apache/flex-sdk/blob/trunk/frameworks/projects/framework/sr
>> > c/mx/managers/IFocusManagerComplexComponent.as
>> >
>> > [2]
>> >
>> https://github.com/apache/flex-sdk/blob/trunk/frameworks/projects/framework/sr
>> > c/mx/managers/FocusManager.as#L1450
>>
>> --
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>>
>>
>

Reply via email to