Roo/form/ComboBox.js
[roojs1] / Roo / form / ComboBox.js
index dc07270..b0cea4c 100644 (file)
@@ -487,7 +487,6 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
         if(this.editable !== false){
             this.el.on("keyup", this.onKeyUp, this);
         }
-        Roo.log('forceSelection : ' + this.forceSelection);
         if(this.forceSelection){
             this.on('blur', this.doForce, this);
         }
@@ -644,9 +643,8 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
     getValue : function(){
         if(this.valueField){
             return typeof this.value != 'undefined' ? this.value : '';
-        }else{
-            return Roo.form.ComboBox.superclass.getValue.call(this);
         }
+        return Roo.form.ComboBox.superclass.getValue.call(this);
     },
 
     /**
@@ -729,6 +727,7 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
     reset : function(){
         // overridden so that last data is reset..
         this.setValue(this.resetValue);
+        this.originalValue = this.getValue();
         this.clearInvalid();
         this.lastData = false;
         if (this.view) {
@@ -892,7 +891,6 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
 
     // private
     doForce : function(){
-        Roo.log('run doForce');
         if(this.el.dom.value.length > 0){
             this.el.dom.value =
                 this.lastSelectionText === undefined ? '' : this.lastSelectionText;
@@ -1065,8 +1063,13 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
         }
         // scroll to?
         this.view.select(match);
-        var sn = Roo.get(this.view.getSelectedNodes()[0])
+        var sn = Roo.get(this.view.getSelectedNodes()[0]);
         sn.scrollIntoView(sn.dom.parentNode, false);
+    },
+    // @overide
+    cleanLeadingSpace : function(e)
+    {
+       return;
     }
 
     /**