Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 3.3 (Release)
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
Steps to reproduce:
<mx:Array id="data">
<mx:Object date="
" />
</mx:Array>
<mx:DataGrid dataProvider="
" editable="true">
<mx:columns>
<mx:DataGridColumn headerText="correct" dataField="date" editorDataField="selectedDate" itemEditor="mx.controls.DateField" />
<mx:DataGridColumn headerText="incorrect" dataField="date" editorDataField="selectedDate" >
<mx:itemEditor>
<mx:Component>
<mx:DateField editable="true" />
</mx:Component>
</mx:itemEditor>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
Actual Results:
When you start editing "correct" column(in example above) and press Escape, editing is cancelled. But when you start editing "incorrect" column and press Escape nothing happens and editing continues.
Expected Results:
Editing should be cancelled in both cases.
Workaround (if any):
mx.controls.DateField class overrides keyDownHandler and checks for Escape key. But the problem is it calls event.stopPropagation() which prevents DataGrid to get Escape key down event inorder to cancel editing mode. Workaround is to comment that one line or extend DateField class, override keyDownHandler and not call super.keyDownHandler. In this case you loose key navigation in DateField but get editing cancellation in case of DataGrid item editor.