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: omup...@gmail.com [mailto:omup...@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> > > > > >