[ 
https://issues.apache.org/jira/browse/FLEX-33741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13771540#comment-13771540
 ] 

Justin Mclean commented on FLEX-33741:
--------------------------------------

Sample code to test:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"; 
                           xmlns:s="library://ns.adobe.com/flex/spark" 
                           xmlns:mx="library://ns.adobe.com/flex/mx" 
initialize="init(event)">
        <s:layout>
                <s:VerticalLayout />
        </s:layout>
        

        <fx:Script>
                <![CDATA[
                        import mx.events.FlexEvent;
                        
                        protected function init(event:FlexEvent):void
                        {
                                df.addEventListener(KeyboardEvent.KEY_DOWN, 
keyPressed);
                        }
                        
                        public function keyPressed(event:Event):void {
                                trace("Key pressed");
                        }
                        
                ]]>
        </fx:Script>
        
        <mx:DateField id="df" editable="true" />
</s:Application>

                
> Propagation of Escape key in mx.controls.DateField should only be stopped if 
> the DropDown is shown
> --------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-33741
>                 URL: https://issues.apache.org/jira/browse/FLEX-33741
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: DateField
>    Affects Versions: Apache Flex 4.10.0
>            Reporter: Stephan Plath
>            Assignee: Justin Mclean
>            Priority: Minor
>              Labels: easyfix, easytest, patch
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> DateField's keyDownHandler() stops propagation of the Escape key only if it 
> is not editable, but this should only be done if the dropDown is shown, so 
> the parent container gets a chance to handle the Escape key.
> Proposed solution:
> ...
> else if (event.keyCode == Keyboard.ESCAPE)
> {
>     if (showingDropdown)
>     {
>         selectedDate = lastSelectedDate;
>         displayDropdown(false, event);
>         event.stopPropagation();
>     }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to