This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 237e6da3c5 sanitize the setting of value in RangeModel. NaN is
resolved to 0 to avoid issues with NaN as an invalid value.
237e6da3c5 is described below
commit 237e6da3c5ef833501c7be6c8d067e50953b2564
Author: greg-dove <[email protected]>
AuthorDate: Fri May 6 10:24:13 2022 +1200
sanitize the setting of value in RangeModel. NaN is resolved to 0 to avoid
issues with NaN as an invalid value.
---
.../src/main/royale/org/apache/royale/html/beads/models/RangeModel.as | 1 +
1 file changed, 1 insertion(+)
diff --git
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/RangeModel.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/RangeModel.as
index 06bcecb12c..75db183fc7 100644
---
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/RangeModel.as
+++
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/RangeModel.as
@@ -186,6 +186,7 @@ package org.apache.royale.html.beads.models
public function set value(newValue:Number):void
{
+ if (isNaN(newValue)) newValue = 0; //we don't want NaN
in the model/UI etc, this is consistent with how Flex did it in the
NumericStepper
if (newValue != _value)
{
// value must lie within the boundaries of
minimum & maximum