At some point, the renderer gets added to the display list and addFocusables should be called again. Maybe focusEnabled=false somewhere in the tree?
-Alex On 11/20/13 11:24 AM, "João Fernandes" <[email protected]> wrote: >Alex, your question did point me to the right direction, I found out the >skin itself was setting hasFocusableChildren to false in the scroller. >After fixing that, the problem is still there so I went to the moment it >creates all the itemrenderers and noticed that for that ItemRenderer, the >*addFocusables* function, does have checkChildren = true but unfortunately >the else statement only loops through the children in container but the >object itself I plan to get focus is under the elements property. > >For the ItemRenderer itself, it doesn't get added to the focusable list >because it fails during the isTabVisible when it starts climbing the >displayList, the Datagrid report hasFocusableChildren = false and fails >the >expression: > >*if (p is IFocusManagerComponent && >!(IFocusManagerComponent(p).hasFocusableChildren))* >* return false;* > > > >On 20 November 2013 17:37, Alex Harui <[email protected]> wrote: > >> Why is the object not in the focusableObjects list? >> >> On 11/20/13 8:42 AM, "João Fernandes" >> <[email protected]> wrote: >> >> >Hi guys, >> > >> >I have this issue with a spark datagrid where I have some >> >defaultItemRenders with their default item Editors but with 2 columns >>with >> >the same custom ItemRenderer which are also marked in the gridColumn >>with >> >rendererIsEditable="true". >> >When I try to tab between the editable columns, all defaults >>ItemEditors >> >work as expected but once reached those custom renderers, tabbing stop >> >working within the cells and jump to another component. >> > >> >I've been debugging for a while and I've noticed that during >> >*setEditedItemPosition()* it tries to set focus on the ItemRenderer >> >(setFocusInItemRenderer) but in the line *o = >> >fm.getNextFocusManagerComponent(false) as DisplayObject;* it fails to >>find >> >the correct object because *getNextFocusManagerComponent2* in the >> >*FocusManager* fails to find the index (returns -1) in line * i = >> >getIndexOfFocusedObject(o);* because the ItemRenderer is not in the >> >focusableObjects list. >> > >> >Does anyone know if there is any way to manage to get the ItemRenderer >> >added to the focusableObjects list? >> > >> > >> >-- >> > >> >João Fernandes >> >> > > >-- > >João Fernandes
