-
9 Apr 2013 9:56 PM #1
[4.2.0] A number field subtracts or adds 1 from its value (odd only) on blur
[4.2.0] A number field subtracts or adds 1 from its value (odd only) on blur
REQUIRED INFORMATION
Ext version tested:- Ext 4.2.0
- IE9
- Chrome
- FireFox
- <!DOCTYPE html>
- A number field subtracts or adds 1 from its value (odd only) on blur. It is, probably, related to JavaScript, but is there any chance to get it fixed?
- Copy/paste 9433381100915133 to the NumberField
- Blur
- The value does not change
- Subtracts 1 => 9433381100915132
Code:<!DOCTYPE html> <html> <head> <title>A number field subtracts or adds 1 from its value (odd only) on blur</title> <link rel="stylesheet" href="../resources/css/ext-all.css" /> <script src="../ext-all-debug.js"></script> <script> Ext.onReady(function () { Ext.create("Ext.form.field.Number", { renderTo: Ext.getBody() }); }); </script> </head> <body> </body> </html>
-
9 Apr 2013 10:37 PM #2
It's the behaviour of parseFloat:
The only real solution would be to implement some kind of BigNumber library.Code:console.log(parseFloat('9433381100915133'));Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
9 Apr 2013 11:27 PM #3
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote