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

Maurice Amsellem commented on FLEX-28679:
-----------------------------------------

Hi again, after some investigation, it seems that the simple following change 
fixes the issue:

(testing that the selection is not a custom item [selectedIndex != 
CUSTOM_SELECTED_ITEM], before copying the selection back to the input text).

ComboBox.as

override mx_internal function updateLabelDisplay(displayItem:* = 
undefined):void {

        if (textInput) {
            if (displayItem == undefined)
                displayItem = selectedItem;
            if (displayItem != null && displayItem != undefined && 
selectedIndex != CUSTOM_SELECTED_ITEM) {
                textInput.text = LabelUtil.itemToLabel(displayItem, labelField, 
labelFunction);
            }
        }
    }

What do you think? 

                
> Can't type new custom selected item to replace existing custom selected item
> ----------------------------------------------------------------------------
>
>                 Key: FLEX-28679
>                 URL: https://issues.apache.org/jira/browse/FLEX-28679
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: ComboBox
>    Affects Versions: Adobe Flex SDK Previous
>         Environment: Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>
> Steps to reproduce:
> 1. Press in the ComboBox
> 2. Type 4
> 3. Press Enter
> 4. Press Tab
> 5. Press in the ComboBox
> 6. Type 5
> 7. Press Enter
>  
>  Actual Results:
>  ComboBox changes text back to 4
>  
>  Expected Results:
>  ComboBox should keep the text as 5
>  
>  Workaround (if any):
>  none

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

Reply via email to