flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Konovalov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-34380) TextInput with prompt displays black prompt
Date Fri, 20 Jun 2014 13:05:24 GMT

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

Mime
View raw message