TextArea being used as an itemEditor misbehaves when the enter key is pressed
Posted
by ChrisInCambo
on Stack Overflow
See other posts from Stack Overflow
or by ChrisInCambo
Published on 2010-03-18T14:32:02Z
Indexed on
2010/03/23
4:51 UTC
Read the original article
Hit count: 309
flex
Hi,
I have a TextArea inside an itemEditor component, the problem is that when typing in the TextArea if the enter key is pressed the itemEditor resets itself rather moving the caret to the next line as expected:
<mx:List width="100%" editable="true" >
<mx:dataProvider>
<mx:ArrayCollection>
<mx:Array>
<mx:Object title="Stairway to Heaven" />
</mx:Array>
</mx:ArrayCollection>
</mx:dataProvider>
<mx:itemRenderer>
<mx:Component>
<mx:Text height="100" text="{data.title}"/>
</mx:Component>
</mx:itemRenderer>
<mx:itemEditor>
<mx:Component>
<mx:TextArea height="100" text="{data.title}"/>
</mx:Component>
</mx:itemEditor>
</mx:List>
</mx:Application>
Could anyone advise how I can get around this strange behaviour and make the enter key behave as expected?
Thanks,
Chris
© Stack Overflow or respective owner