X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/530ef4b6c5b943cfa68b779d11cf7de29aa878bf..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/docs/source/TextField.html diff --git a/docs/source/TextField.html b/docs/source/TextField.html index 254eaa21..8806ffb4 100644 --- a/docs/source/TextField.html +++ b/docs/source/TextField.html @@ -7,10 +7,10 @@
/*!
- * Ext JS Library 3.2.1
- * Copyright(c) 2006-2010 Ext JS, Inc.
- * licensing@extjs.com
- * http://www.extjs.com/license
+ * Ext JS Library 3.3.1
+ * Copyright(c) 2006-2010 Sencha Inc.
+ * licensing@sencha.com
+ * http://www.sencha.com/license
  */
 
/** * @class Ext.form.TextField @@ -330,14 +330,16 @@ var myField = new Ext.form.NumberField({ // private preFocus : function(){ - var el = this.el; + var el = this.el, + isEmpty; if(this.emptyText){ if(el.dom.value == this.emptyText){ this.setRawValue(''); + isEmpty = true; } el.removeClass(this.emptyClass); } - if(this.selectOnFocus){ + if(this.selectOnFocus || isEmpty){ el.dom.select(); } }, @@ -446,7 +448,7 @@ var myField = new Ext.form.NumberField({ getErrors: function(value) { var errors = Ext.form.TextField.superclass.getErrors.apply(this, arguments); - value = value || this.processValue(this.getRawValue()); + value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue()); if (Ext.isFunction(this.validator)) { var msg = this.validator(value);