[
https://issues.apache.org/jira/browse/FLEX-25939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Mclean updated FLEX-25939:
---------------------------------
Labels: easyfix easytest (was: )
> NumericStepper fails to commit when value is set to NaN
> -------------------------------------------------------
>
> Key: FLEX-25939
> URL: https://issues.apache.org/jira/browse/FLEX-25939
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: NumericStepper
> Affects Versions: Adobe Flex SDK 4.1 (Release)
> Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Browser: Firefox 3.x
> Language Found: English
> Reporter: Adobe JIRA
> Labels: easyfix, easytest
>
> 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.
--
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