flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Ferreras (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-33537) Spark TextArea writing in prompt text format
Date Tue, 10 Sep 2013 09:57:52 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13762913#comment-13762913
] 

Roberto Ferreras commented on FLEX-33537:
-----------------------------------------

This fix breaks my application.

May be I'm doing something wrong, or I'm depending on unspecified behavior.

We need to move the focus between some components with the enter key (it's an accounting application).

To do that, when the user presses the enter key, I get the focusManager of the document and
loop through the normal tab cycle until I reach the next enter-enabled component. I do that
calling consecutively {{IFocusManager}} {{getNextFocusManagerComponent()}} and {{setFocus()}}.

This worked until 4.10. I suspect it's because of the use of {{callLater()}}.

In the provided simplified example, the loop becomes infinite. (If using IE, if you change
to another window and return, it breaks the loop.)

                
> 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
>          Components: Spark: TextArea, Spark: TextInput
>    Affects Versions: Apache Flex 4.9.0
>            Reporter: Curtis Aube
>            Assignee: Mark Kessler
>             Fix For: Apache Flex Next
>
>
> Initialize a s:TextArea, set the prompt text to something and set the text to something.
Sometime later set the text to empty string, remove the TextArea from the display, add it
to back the display and set focus on it. 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.
> Workaround: Don't set the focus immediately after adding the TextArea such as using callLater.

--
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

Mime
View raw message