X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/530ef4b6c5b943cfa68b779d11cf7de29aa878bf..b37ceabb82336ee82757cd32efe353cfab8ec267:/src/widgets/form/NumberField.js diff --git a/src/widgets/form/NumberField.js b/src/widgets/form/NumberField.js index 567a8cba..e132013d 100644 --- a/src/widgets/form/NumberField.js +++ b/src/widgets/form/NumberField.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.2.1 + * Ext JS Library 3.2.2 * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license @@ -120,6 +120,7 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, { }, setValue : function(v){ + v = this.fixPrecision(v); v = Ext.isNumber(v) ? v : parseFloat(String(v).replace(this.decimalSeparator, ".")); v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator); return Ext.form.NumberField.superclass.setValue.call(this, v); @@ -159,7 +160,7 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, { beforeBlur : function(){ var v = this.parseValue(this.getRawValue()); if(!Ext.isEmpty(v)){ - this.setValue(this.fixPrecision(v)); + this.setValue(v); } } });