You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Mihai Chira (JIRA)" <ji...@apache.org> on 2014/05/28 18:49:03 UTC

[jira] [Reopened] (FLEX-33934) Holding Shift+TAB pressed in DataGrid makes focus jump to textField outside grid, then back to grid editors, and so on

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

Mihai Chira reopened FLEX-33934:
--------------------------------


I'm going to reopen this because I suspect there was a misunderstanding.

To clarify:

The expected behaviour is for the focus to move exactly like it does when Shift+TAB is pressed slowly (with low frequency), i.e. from Brazil to Guinea to Iraq to Burundi to ... to Australia to the entire datagrid and then to the text field.

When Shift+TAB is held pressed, the focus jumps like this: Brazil to Guinea to text field to Iraq to text field to Burundi to text field, etc.

> 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 behaviour: focus jumps back and forth between the grid's item editors and the text field outside the grid.
> Desired behaviour: focus jumps backward only through the editors, not involving the text field outside the grid.
> Note: this happens without problems when Shift+TAB is pressed with lower frequency.
> 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.
> NOTES:
> * using selectedIndex instead of selectedItem works without error.



--
This message was sent by Atlassian JIRA
(v6.2#6252)