Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Adobe Flex SDK 3.4 (Release)
-
None
-
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)
else
{ return super.selectedIndex; }}