fix whitespace removal
[roojs1] / Roo / form / TextField.js
index 20a8c7d..825f87f 100644 (file)
@@ -174,7 +174,7 @@ Roo.extend(Roo.form.TextField, Roo.form.Field,  {
     // private - clean the leading white space
     cleanLeadingSpace : function(e)
     {
-       this.setValue(this.getValue().replace(/^\s+/,''));
+       this.setValue((this.getValue() + '').replace(/^\s+/,''));
     },
     /**
      * Resets the current field value to the originally-loaded value and clears any validation messages.