Roo/form/NumberField.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 10 Jan 2012 07:53:33 +0000 (15:53 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 10 Jan 2012 07:53:33 +0000 (15:53 +0800)
Roo/form/NumberField.js

index db18e79..0ca2fca 100644 (file)
@@ -133,6 +133,7 @@ Roo.extend(Roo.form.NumberField, Roo.form.TextField,  {
     },
 
     setValue : function(v){
+        v = this.fixPrecision(v);
         Roo.form.NumberField.superclass.setValue.call(this, String(v).replace(".", this.decimalSeparator));
     },
 
@@ -144,7 +145,7 @@ Roo.extend(Roo.form.NumberField, Roo.form.TextField,  {
     beforeBlur : function(){
         var v = this.parseValue(this.getRawValue());
         if(v){
-            this.setValue(this.fixPrecision(v));
+            this.setValue(v);
         }
     }
 });
\ No newline at end of file