1
votes

I'm using a Spark List with a TextInput in the ItemRenderer, with ability for the user to reorder the list rows by drag'n'dropping them. This is how I declared the list :

<s:List id="list" left="245" top="119" width="667" height="433"
                dragDrop="insertItem(event)" dragEnabled="true" dragEnter="acceptDrop(event)" dragComplete="finalizeDragAndMove(event)"
                dragMoveEnabled="true" dropEnabled="true" focusAlpha="0"
                skinClass="components.DataList_Campaign"
                hasFocusableChildren="true" />

Everything works fine, except that it's impossible to select the text in the TextInput with the mouse, instead it's dragging the row...How can I set the TextInput to have priority over drag'n'drop ?

1
What do you mean by 'having priority' ? - LoremIpsum
Actually I would like to be able to select the entire text in the TextInput with the mouse, but I can't because "priority" (maybe it's not the most appropriate term) is given to the list : I can only drag the row, even when the TextInput has the focus... - jroy

1 Answers

1
votes

In your TextInput item renderer just declare 2 events like this:
<s:TextInput focusIn="outerDocument.list.dragEnabled=false" focusOut="outerDocument.list.dragEnabled=true"/>
hope this will help...