flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Harui (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-34365) TextInput's displayAsPassword related errors
Date Sun, 22 Jun 2014 14:43:24 GMT

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

Alex Harui commented on FLEX-34365:
-----------------------------------

If you do not need to scroll the UI, try the StageTextInputSkin instead of ScrollableStageTextInputSkin

> TextInput's displayAsPassword related errors
> --------------------------------------------
>
>                 Key: FLEX-34365
>                 URL: https://issues.apache.org/jira/browse/FLEX-34365
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: TextInput
>    Affects Versions: Apache Flex 4.12.0, Apache Flex 4.12.1
>         Environment: Flash Builder 4.7's simulator, Android 4.2.2 (app with captive runtime).
> - When testing SDK 4.12.1 used the AIR 13 SDK.
> - When testing SDK 4.12.0 used the default AIR SDK.
> - When testing SDK 4.11.1 used the AIR 3.9 SDK.
> - When testing SDK 4.6 used the default AIR SDK.
>            Reporter: Sebastian Toro
>              Labels: displayAsPassword, mobileTextInput, password, textinput
>             Fix For: Adobe Flex SDK 4.6 (Release), Apache Flex 4.11.0
>
>
> Run the following code on an Android mobile project:
> <?xml version="1.0" encoding="utf-8"?>
> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
> 		xmlns:s="library://ns.adobe.com/flex/spark"
> 		title="DisplayAsPassword">
> 	
> 	<fx:Script>
> 		<![CDATA[
> 			
> 			/**
> 			 * Shows or hides the characters in the password field.
> 			 */
> 			protected function togglePasswordDisplay(event:Event):void
> 			{
> 				appPassword.displayAsPassword = !event.target.selected;
> 			}
> 			
> 		]]>
> 	</fx:Script>
> 	
> 	<s:TextInput id="appPassword"
> 				 restrict="-A-Za-z0-9._" displayAsPassword="true"
> 				 top="20" left="20" right="20"/>
> 	<s:CheckBox id="showPasswordButton"
> 				change="togglePasswordDisplay(event)"
> 				top="{appPassword.y + appPassword.height + 20}" horizontalCenter="0"/>
> 	
> </s:View>
> When the CheckBox's selected property changes, the TextInput's displayAsPassword property
won't. If the CheckBox's selected property changes and then the TextInput is focused, then
the displayAsPassword property changes.
> The following solves the property update problem but introduces a new one:
> <?xml version="1.0" encoding="utf-8"?>
> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
> 		xmlns:s="library://ns.adobe.com/flex/spark"
> 		title="DisplayAsPassword">
> 	
> 	<s:TextInput id="appPassword"
> 				 restrict="-A-Za-z0-9._" displayAsPassword="{!showPasswordButton.selected}"
> 				 top="20" left="0" right="0"/>
> 	<s:CheckBox id="showPasswordButton"
> 				selected="false"
> 				top="{appPassword.y + appPassword.height + 20}" horizontalCenter="0"/>
> 	
> </s:View>
> When the displayAsPassword property is updated to false and then the TextInput is focused,
the text blinking cursor will be positioned where the end of the text would be if the displayAsPassword
was true.
> This problem is not present in version 4.6 and 4.11 from the SDK, so the bug must be
introduced on 4.12.0.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message