Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 3.2 (Release)
-
None
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Browser: Internet Explorer 6.x
Language Found: English
Description
I was recently writing my own dropDown-like component, using ColorPicker as the basis for some of the code. When, through testing, I found cases where my dropDown was being positioned incorrectly, I traced it back to code that I copied from ColorPicker. The problem code is where ColorPicker decides how to place the dropDown horizontally:
// Position: left or right
if (point.x + width + dropdownSwatch.width > screen.right &&
point.x > (screen.left + dropdownSwatch.width))
As I understand it, the code should left-align the dropDown with the picker itself, unless it extends too far to the right (and there's enough room to right-align it). If I'm correct, then the above if statement is wrong. It looks to see if there's space to put the dropDown fully to the left or right of the picker, which isn't what it actually does. It should be something like:
if (point.x + dropdownSwatch.width > screen.right &&
&& point.x >= (dropdownSwatch.width - width))