[ 
https://issues.apache.org/jira/browse/FLEX-33934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Harui resolved FLEX-33934.
-------------------------------

    Resolution: Not A Problem

As written the test case has a DG and a TextInput.  The expected behavior is 
for focus to switch between the two.  If you don't want focus to a control you 
can try disabling it, hiding it, etc.

If I saw a TextInput in a UI, I would expect I could tab to it.  If you do 
prevent tabbing to it, how would someone who can't use a mouse use the keyboard 
to give it focus?

There are also properties like focusEnabled and tabFocusEnabled, but the UI 
will still look like you should be able to set focus to the TextInput.


> Holding Shift+TAB pressed in DataGrid makes focus jump to textField outside 
> grid, then back to grid editors, and so on
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-33934
>                 URL: https://issues.apache.org/jira/browse/FLEX-33934
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Focus Manager, Spark: DataGrid
>    Affects Versions: Apache Flex 4.11.0
>         Environment: Windows 8, Adobe AIR 3.9
>            Reporter: Mihai Chira
>            Assignee: Alex Harui
>         Attachments: _DataGridFocus.fxp
>
>
> Steps to reproduce:
> 1. Import and run the attached project.
> 2. Double click on Brazil to enter edit mode
> 3. Press and hold Shift+TAB to tab backward through components
> Actual result: focus jumps back and forth between the grid's item editors and 
> the text field outside the grid.
> Desired result: focus jumps backward only through the editors, not involving 
> the text field outside the grid.
> Note: in our application we have the same problem with the forward focus 
> (Shift not pressed), which I could not reproduce in this simple app. And 
> since we're creating many grids whose cells should be editable similarly to 
> Microsoft Excel's, the priority for us is high.
> Hints:
> 1. From my understanding, DataGridEditor.editor_keyFocusChangeHandler() and 
> FocusManager.keyFocusChangeHandler() respond to the same event 
> (FocusEvent.KEY_FOCUS_CHANGE), but listen to different objects for it. When 
> things work correctly, DataGridEditor reponds to the event once the user 
> presses (Shift+)TAB in a grid's item editor, and (does the necessary work to 
> create and focus the next editor and then) calls preventDefault() on the 
> event, which tells the FocusManager not to apply its default behaviour. All 
> works fine.
> 2. However, when (Shift+)TAB is held pressed, or pressed very quickly, what 
> seems to happen at times is that 
> DataGridEditor.editor_keyFocusChangeHandler() is never called. From what I 
> can tell from tracing the event instance in FocusManager, that's because the 
> event's target is no longer the textDisplay inside the item editor, but the 
> strange 
> "_DataGridFocus0.WindowedApplicationSkin2.Group3.contentGroup.__DataGridFocus_DataGrid1.UIComponent37"
>  instance. This means that DataGridEditor cannot respond to this event, since 
> it's not thrown by the editor it's listening to.
> 3. I also put traces where the editor is removed and where it's created in 
> DataGridEditor, which showed that when the unusual event is thrown (see hint 
> #2) the item editor is still not null, is still on stage, and still has the 
> event listener for FocusEvent.KEY_FOCUS_CHANGE. So it's not that the editor 
> has been destroyed - it's just that the event is thrown by another component.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to