You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Alexander Konovalov (JIRA)" <ji...@apache.org> on 2014/06/20 15:05:24 UTC
[jira] [Commented] (FLEX-34380) TextInput with prompt displays
black prompt
[ https://issues.apache.org/jira/browse/FLEX-34380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038759#comment-14038759 ]
Alexander Konovalov commented on FLEX-34380:
--------------------------------------------
As workaround copy TextInputSkin and add handlers on 'addedToStage', 'show' and 'currentStateChange':
protected function this_addedToStageHandler(event:Event):void
{
if (!event) return;
// Update text style.
if (currentState == "normalWithPrompt" || currentState == "disabledWithPrompt")
{
setStyle("color", 0xBABABA);
setStyle("fontStyle", "italic");
}
else
{
setStyle("color", 0x000000);
setStyle("fontStyle", "normal");
}
}
protected function this_showHandler(event:FlexEvent):void
{
if (!event) return;
// Update text style.
if (currentState == "normalWithPrompt" || currentState == "disabledWithPrompt")
{
setStyle("color", 0xBABABA);
setStyle("fontStyle", "italic");
}
else
{
setStyle("color", 0x000000);
setStyle("fontStyle", "normal");
}
}
protected function this_currentStateChange(event:StateChangeEvent):void
{
if (!event) return;
// Update text style.
if (currentState == "normalWithPrompt" || currentState == "disabledWithPrompt")
{
setStyle("color", 0xBABABA);
setStyle("fontStyle", "italic");
}
else
{
setStyle("color", 0x000000);
setStyle("fontStyle", "normal");
}
}
> TextInput with prompt displays black prompt
> -------------------------------------------
>
> Key: FLEX-34380
> URL: https://issues.apache.org/jira/browse/FLEX-34380
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: TextArea, Spark: TextInput
> Affects Versions: Adobe Flex SDK 4.6 (Release), Apache Flex 4.12.0
> Reporter: Alexander Konovalov
> Labels: TextArea, TextInput, callout, prompt
>
> The reason of the bug is component visibility changes without data changes.
> Steps to reproduce (the easiest way to reproduce, but bug persists almost everywhere):
> 1. Create AIR application (add mobilecomponents.swc).
> 2. Add CalloutButton
> 3. Add spark TextInput inside CalloutButton with some prompt text.
> 4. Run. Click on CalloutButton -> grey prompt in TextInput.
> 5. Close and open CalloutButton second time -> black color for prompt
> Code:
> <s:CalloutButton label="TEST">
> <s:TextInput prompt="SOME PROMPT" />
> </s:CalloutButton>
--
This message was sent by Atlassian JIRA
(v6.2#6252)