You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Jason Taylor <ja...@dedoose.com> on 2016/02/18 00:18:18 UTC

Issue with Spark DropDownList in 15.0

noticing the following issue:

- spark drop down list has a event handler for change
- on change event handler calls spark TextArea.setfocus (guessing any setfocus should trigger issue)
- dropdownlist does not close


Sample Application:
<?xml version="1.0"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
    <s:DropDownList id="fontDDL" width="150" change="OnFontChange(event)">
        <s:dataProvider>
            <s:ArrayList id="fontList" source="[Arial,Times New Roman,Verdana,Trebuchet MS]" />
        </s:dataProvider>
    </s:DropDownList>

    <s:TextArea id="textArea" width="100%" top="20" bottom="10"/>
    <fx:Script><![CDATA[
        import spark.events.IndexChangeEvent;

        protected function OnFontChange(evt:IndexChangeEvent):void
        {
            textArea.setFocus();
        }
        ]]></fx:Script>
</s:Application>


Re: Issue with Spark DropDownList in 15.0

Posted by Alex Harui <ah...@adobe.com>.

On 2/17/16, 10:48 PM, "omuppi1@gmail.com on behalf of OmPrakash Muppirala"
<omuppi1@gmail.com on behalf of bigosmallm@gmail.com> wrote:

>It might be a bug.   But I always thought this is the kind of scenario for
>which the the callLater method was created for.

Without having debugged into it, I'd say it is a bug.  The drop down
should go away for any number of scenarios where it loses focus.

-Alex


RE: Issue with Spark DropDownList in 15.0

Posted by OmPrakash Muppirala <bi...@gmail.com>.
It might be a bug.   But I always thought this is the kind of scenario for
which the the callLater method was created for.

Thanks,
Om
On Feb 17, 2016 4:29 PM, "Jason Taylor" <ja...@dedoose.com> wrote:

> that was the fix :-P, works fine with callLater, but still seems to be a
> bug
>
> -----Original Message-----
> From: omuppi1@gmail.com [mailto:omuppi1@gmail.com] On Behalf Of OmPrakash
> Muppirala
> Sent: Wednesday, February 17, 2016 3:50 PM
> To: users@flex.apache.org
> Subject: Re: Issue with Spark DropDownList in 15.0
>
> What happens when you set textArea.setFocus() in a callLater function?
>
> Thanks,
> Om
>
> On Wed, Feb 17, 2016 at 3:18 PM, Jason Taylor <ja...@dedoose.com> wrote:
>
> > noticing the following issue:
> >
> > - spark drop down list has a event handler for change
> > - on change event handler calls spark TextArea.setfocus (guessing any
> > setfocus should trigger issue)
> > - dropdownlist does not close
> >
> >
> > Sample Application:
> > <?xml version="1.0"?>
> > <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> > xmlns:s="library://ns.adobe.com/flex/spark">
> >     <s:DropDownList id="fontDDL" width="150"
> change="OnFontChange(event)">
> >         <s:dataProvider>
> >             <s:ArrayList id="fontList" source="[Arial,Times New
> > Roman,Verdana,Trebuchet MS]" />
> >         </s:dataProvider>
> >     </s:DropDownList>
> >
> >     <s:TextArea id="textArea" width="100%" top="20" bottom="10"/>
> >     <fx:Script><![CDATA[
> >         import spark.events.IndexChangeEvent;
> >
> >         protected function OnFontChange(evt:IndexChangeEvent):void
> >         {
> >             textArea.setFocus();
> >         }
> >         ]]></fx:Script>
> > </s:Application>
> >
> >
>

RE: Issue with Spark DropDownList in 15.0

Posted by Jason Taylor <ja...@dedoose.com>.
that was the fix :-P, works fine with callLater, but still seems to be a bug

-----Original Message-----
From: omuppi1@gmail.com [mailto:omuppi1@gmail.com] On Behalf Of OmPrakash Muppirala
Sent: Wednesday, February 17, 2016 3:50 PM
To: users@flex.apache.org
Subject: Re: Issue with Spark DropDownList in 15.0

What happens when you set textArea.setFocus() in a callLater function?

Thanks,
Om

On Wed, Feb 17, 2016 at 3:18 PM, Jason Taylor <ja...@dedoose.com> wrote:

> noticing the following issue:
>
> - spark drop down list has a event handler for change
> - on change event handler calls spark TextArea.setfocus (guessing any 
> setfocus should trigger issue)
> - dropdownlist does not close
>
>
> Sample Application:
> <?xml version="1.0"?>
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark">
>     <s:DropDownList id="fontDDL" width="150" change="OnFontChange(event)">
>         <s:dataProvider>
>             <s:ArrayList id="fontList" source="[Arial,Times New 
> Roman,Verdana,Trebuchet MS]" />
>         </s:dataProvider>
>     </s:DropDownList>
>
>     <s:TextArea id="textArea" width="100%" top="20" bottom="10"/>
>     <fx:Script><![CDATA[
>         import spark.events.IndexChangeEvent;
>
>         protected function OnFontChange(evt:IndexChangeEvent):void
>         {
>             textArea.setFocus();
>         }
>         ]]></fx:Script>
> </s:Application>
>
>

Re: Issue with Spark DropDownList in 15.0

Posted by OmPrakash Muppirala <bi...@gmail.com>.
What happens when you set textArea.setFocus() in a callLater function?

Thanks,
Om

On Wed, Feb 17, 2016 at 3:18 PM, Jason Taylor <ja...@dedoose.com> wrote:

> noticing the following issue:
>
> - spark drop down list has a event handler for change
> - on change event handler calls spark TextArea.setfocus (guessing any
> setfocus should trigger issue)
> - dropdownlist does not close
>
>
> Sample Application:
> <?xml version="1.0"?>
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark">
>     <s:DropDownList id="fontDDL" width="150" change="OnFontChange(event)">
>         <s:dataProvider>
>             <s:ArrayList id="fontList" source="[Arial,Times New
> Roman,Verdana,Trebuchet MS]" />
>         </s:dataProvider>
>     </s:DropDownList>
>
>     <s:TextArea id="textArea" width="100%" top="20" bottom="10"/>
>     <fx:Script><![CDATA[
>         import spark.events.IndexChangeEvent;
>
>         protected function OnFontChange(evt:IndexChangeEvent):void
>         {
>             textArea.setFocus();
>         }
>         ]]></fx:Script>
> </s:Application>
>
>