Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 4.1 (Release)
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Browser: Firefox 3.x
Language Found: English
Description
Steps to reproduce:
1.Create a NumericStepper whose value field is bound to a property of an object
2.Set that object property to NaN
3.Make a change to the input of the stepper such that the input string is 3 chars long and evaluate the value property
Actual Results: If the change was made by directly editing the text, the text will have changed but value will remain NaN. Attempting to use the stepper buttons will have no effect.
Expected Results: The value should update to the text input once the change is committed
Workaround (if any): The bug is being caused by a logic error on line 749 of NumericStepper.as. In most cases, even if value is NaN, the if statement would still evaluate to true since the length of the input string would not be equal to the length of value. Since NaN is 3 characters long however, any input with a length of 3 will cause the if statement to evaluate to false and prevent value from being updated.
The simplest workaround is to make sure that the object property value is bound to is never NaN, however this may not always be possible in which case you would have to extend NumericStepper and override the commitProperties() function with a version that checks if value is NaN.