Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-24026

The first color in ColorPicker (black) cannot be selected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Adobe Flex SDK 3.4 (Release)
    • None
    • mx: ColorPicker
    • None
    • Affected OS(s): Windows
      Affected OS(s): Windows XP
      Browser: Firefox 3.x
      Language Found: English

    Description

      Steps to reproduce:
      1. Create a ColorPicker with a non-websafe selectedColor; i.e.: <mx:ColorPicker selectedColor="0xF15654" />
      2. Try to select the first color (the black in top left corner)

      Actual Results:
      That color cannot be selected.

      Expected Results:
      The color should be selectable

      Workaround (if any):
      The problem is that the selectedIndex of the ColorPicker is 0 by default and the selectColor method doesn't change it to -1 when a non-websafe color (such that is not in dataProvider) is set.

      We can extend the ColorPicker and override selectedIndex getter (unfortunately we cannot set the actual selectedIndex value to -1 as we cannot overide private properties):

      override public function get selectedIndex():int {
      if (super.selectedIndex == 0 && selectedColor!=0x000000)

      { //no need to search for a proper index of the color - the dropDown will do that itself based on selectedColor return -1; }

      else

      { return super.selectedIndex; }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: