You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Curtis Aube (JIRA)" <ji...@apache.org> on 2013/04/30 23:02:15 UTC

[jira] [Updated] (FLEX-33537) Spark TextArea writing in prompt text format

     [ https://issues.apache.org/jira/browse/FLEX-33537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Curtis Aube updated FLEX-33537:
-------------------------------

    Description: 
Initialize a s:TextArea, set the prompt text to something, set the text to something, set the text to empty string, remove it from the display and then add it to the display. The next time you type, you will be typing in the prompt text format.

Ex.

<?xml version="1.0" encoding="utf-8"?>
<s:Application minHeight="600" minWidth="955" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
	<fx:Script>
		<![CDATA[
			private function selectTextArea():void
			{
				testTextArea.text = "";
				box.removeAllElements();
				box.addElement(testTextArea);
				testTextArea.setFocus();
			}
		]]>
	</fx:Script>
	<s:VGroup>
		<s:HGroup>
			<s:Button label="Break text area" click="{selectTextArea()}"/>
		</s:HGroup>
		<s:HGroup id="box">
			<s:TextArea id="testTextArea" text="Some text" prompt="Enter something..."/>
		</s:HGroup>
	</s:VGroup>
</s:Application>

Another issue is: If you try to set the focus before removing and adding the TextArea, the focus rectangle doesn't show up.


  was:
If you initialize a s:TextArea, set the text to something, set the text to empty string, remove it from the display and then add it to the display, the next time you type, you will be typing in the prompt text format.

Ex.

<?xml version="1.0" encoding="utf-8"?>
<s:Application minHeight="600" minWidth="955" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
	<fx:Script>
		<![CDATA[
			private function selectTextArea():void
			{
				testTextArea.text = "";
				box.removeAllElements();
				box.addElement(testTextArea);
				testTextArea.setFocus();
			}
		]]>
	</fx:Script>
	<s:VGroup>
		<s:HGroup>
			<s:Button label="Break text area" click="{selectTextArea()}"/>
		</s:HGroup>
		<s:HGroup id="box">
			<s:TextArea id="testTextArea" text="Some text" prompt="Enter something..."/>
		</s:HGroup>
	</s:VGroup>
</s:Application>

Another issue is: If you try to set the focus before removing and adding the TextArea, the focus rectangle doesn't show up.


    
> Spark TextArea writing in prompt text format
> --------------------------------------------
>
>                 Key: FLEX-33537
>                 URL: https://issues.apache.org/jira/browse/FLEX-33537
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.9.0
>            Reporter: Curtis Aube
>
> Initialize a s:TextArea, set the prompt text to something, set the text to something, set the text to empty string, remove it from the display and then add it to the display. The next time you type, you will be typing in the prompt text format.
> Ex.
> <?xml version="1.0" encoding="utf-8"?>
> <s:Application minHeight="600" minWidth="955" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark">
> 	<fx:Script>
> 		<![CDATA[
> 			private function selectTextArea():void
> 			{
> 				testTextArea.text = "";
> 				box.removeAllElements();
> 				box.addElement(testTextArea);
> 				testTextArea.setFocus();
> 			}
> 		]]>
> 	</fx:Script>
> 	<s:VGroup>
> 		<s:HGroup>
> 			<s:Button label="Break text area" click="{selectTextArea()}"/>
> 		</s:HGroup>
> 		<s:HGroup id="box">
> 			<s:TextArea id="testTextArea" text="Some text" prompt="Enter something..."/>
> 		</s:HGroup>
> 	</s:VGroup>
> </s:Application>
> Another issue is: If you try to set the focus before removing and adding the TextArea, the focus rectangle doesn't show up.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira