What version of Flex?  Is there a test case and bug for this issue?  If
not please file one.  In looking at the code, the CHANGE event should
not be bubbling from TextArea or TextInput.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Andriy Panas
Sent: Tuesday, October 30, 2007 10:18 AM
To: [email protected]
Subject: Re: [flexcoders] Re: Flash/Flex Event collision on TextField
input

 

Hi all,

   I want to provide a little bit more information for the solution for
this issue, because I was stumbled upon this issue today and thankfully
to this topic at Flexcoders mailing list I had received a solid
understanding of this particular problem. 
   

   Imagine that in your setup mx:TextArea is a child of mx:ViewStack or
mx:Accordion container. 

   When the content of the TextArea is changed, then Event.CHANGE
"change" this emitted, but it is actually an bubbling event and it
reaches the level of the parent container when it can collide with the
same event name mx.events.IndexChangedEvent.CHANGE "change" that is
actually emitted by ViewStack itself.

   Most simple solution to this situation is to forbid event bubbling
for you mx:TextArea component, code follows:

  <mx:TextArea id="myTextArea">

....

function onCreationComplete() : void { 
   myTextArea.addEventListener(Event.CHANGE, onTextChanged);
}

private function onTextChanged(event : Event) : void {
            event.stopImmediatePropagation();
}

-- 
--
Med venlig hilsen / Best regards   
Andriy Panas

On 30/08/2007, George <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
wrote:

Yeah, you're right. All components are hosted by a ViewStack which 
listening 'change' event.

 

 

Reply via email to