#8692 closed defect (fixed)
Large integer values in CurrencyTextBox produces a rounding error
Reported by: | Cormac Flynn | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Dijit - Form | Version: | 1.3.0b1 |
Keywords: | currency integer | Cc: | |
Blocked By: | Blocking: |
Description
In testing dojo 1.3b, one of my unit tests fails and it seems to be a change in the behaviour of the CurrencyTextBox?.
For example, in the validation test page for v1.2.3
Enter 99999999999999999999999999999 in the field labelled euro currency (local format) fractional part is optional:. This is greater than the maximum integer value, and the field is correctly marked as being in error.
Perform the same test on the 1.3b release, or a nightly build
http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/form/test_validate.html
Upon onBlur, the field value is rounded down to 1.0 and is marked as being not in error.
Change History (7)
comment:1 Changed 12 years ago by
Owner: | set to Douglas Hays |
---|
comment:2 Changed 12 years ago by
perhaps we should document a maximum value for numbertextboxes also
comment:5 Changed 12 years ago by
Ok, so I backed out the 1.3 change and now we should be only as bad off as we were in 1.2.x. Strangely, copying in that string of 9's results in a validation error, but typing it in results in formatting to "€1e,+29.00" (see #8756) At least it's not making gross rounding errors atm.
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
Rounding changes were introduced that would round this to 1.0e+29, which hopefully we can live with, except currency text box apparently drops the exponential