From c6296ab736592edfbf4af91cd2626e859b019a0e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 31 Jul 2019 12:16:27 +0800 Subject: [PATCH] roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js Roo/form/ComboBox.js --- Roo/form/ComboBox.js | 7 +------ roojs-all.js | 2 +- roojs-debug.js | 5 +++++ roojs-ui-debug.js | 5 +++++ roojs-ui.js | 2 +- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Roo/form/ComboBox.js b/Roo/form/ComboBox.js index b0cea4c60e..0117cc201c 100644 --- a/Roo/form/ComboBox.js +++ b/Roo/form/ComboBox.js @@ -1065,12 +1065,7 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, { this.view.select(match); var sn = Roo.get(this.view.getSelectedNodes()[0]); sn.scrollIntoView(sn.dom.parentNode, false); - }, - // @overide - cleanLeadingSpace : function(e) - { - return; - } + } /** * @cfg {Boolean} grow diff --git a/roojs-all.js b/roojs-all.js index 2aaf17e559..c61652e036 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -1733,7 +1733,7 @@ if(!this.editable){Roo.get(document).un('keydown',this.listKeyPress,this);}this. },onTriggerClick:function(){if(this.disabled){return;}if(this.isExpanded()){this.collapse();if(!this.blockFocus){this.el.focus();}}else{this.hasFocus=true;if(this.triggerAction=='all'){this.doQuery(this.allQuery,true);}else{this.doQuery(this.getRawValue()); }if(!this.blockFocus){this.el.focus();}}},listKeyPress:function(e){if(e.isSpecialKey()){return false;}var k=String.fromCharCode(e.getKey()).toUpperCase();var A=false;var B=this.view.getSelectedNodes();var C=false;if(B.length){var ix=this.view.indexOf(B[0]); C=this.store.getAt(ix);if(!C.get(this.displayField)||C.get(this.displayField).substring(0,1).toUpperCase()!=k){C=false;}}this.store.each(function(v){if(C){if(C.id==v.id){C=false;}return;}if(v.get(this.displayField)&&v.get(this.displayField).substring(0,1).toUpperCase()==k){A=this.store.indexOf(v); -return false;}},this);if(A===false){return true;}this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0]);sn.scrollIntoView(sn.dom.parentNode,false);}}); +return false;}},this);if(A===false){return true;}this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0]);sn.scrollIntoView(sn.dom.parentNode,false);},cleanLeadingSpace:function(e){return;}}); // Roo/form/ComboBoxArray.js Roo.form.ComboBoxArray=function(A){this.addEvents({'beforeremove':true,'remove':true});Roo.form.ComboBoxArray.superclass.constructor.call(this,A);this.items=new Roo.util.MixedCollection(false);};Roo.extend(Roo.form.ComboBoxArray,Roo.form.TextField,{lastData:false,inputType:'hidden',width:300,name:false,hiddenName:false,items:false,hiddenEl:false,el:false,onRender:function(ct,A){this.combo.hiddenName=this.hiddenName?(this.hiddenName+'-subcombo'):this.hiddenName; this.combo.name=this.name?(this.name+'-subcombo'):this.name;this.combo=Roo.factory(this.combo,Roo.form);this.combo.onRender(ct,A);if(typeof(this.combo.width)!='undefined'){this.combo.onResize(this.combo.width,0);}this.combo.initEvents();this.store=this.combo.store; diff --git a/roojs-debug.js b/roojs-debug.js index 161bc3ca4c..6c28978894 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -42126,6 +42126,11 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, { this.view.select(match); var sn = Roo.get(this.view.getSelectedNodes()[0]); sn.scrollIntoView(sn.dom.parentNode, false); + }, + // @overide + cleanLeadingSpace : function(e) + { + return; } /** diff --git a/roojs-ui-debug.js b/roojs-ui-debug.js index b17c7324e9..da8ddf49c0 100644 --- a/roojs-ui-debug.js +++ b/roojs-ui-debug.js @@ -19675,6 +19675,11 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, { this.view.select(match); var sn = Roo.get(this.view.getSelectedNodes()[0]); sn.scrollIntoView(sn.dom.parentNode, false); + }, + // @overide + cleanLeadingSpace : function(e) + { + return; } /** diff --git a/roojs-ui.js b/roojs-ui.js index 945eb216e0..f6effa8bee 100644 --- a/roojs-ui.js +++ b/roojs-ui.js @@ -864,7 +864,7 @@ if(!this.editable){Roo.get(document).un('keydown',this.listKeyPress,this);}this. },onTriggerClick:function(){if(this.disabled){return;}if(this.isExpanded()){this.collapse();if(!this.blockFocus){this.el.focus();}}else{this.hasFocus=true;if(this.triggerAction=='all'){this.doQuery(this.allQuery,true);}else{this.doQuery(this.getRawValue()); }if(!this.blockFocus){this.el.focus();}}},listKeyPress:function(e){if(e.isSpecialKey()){return false;}var k=String.fromCharCode(e.getKey()).toUpperCase();var A=false;var B=this.view.getSelectedNodes();var C=false;if(B.length){var ix=this.view.indexOf(B[0]); C=this.store.getAt(ix);if(!C.get(this.displayField)||C.get(this.displayField).substring(0,1).toUpperCase()!=k){C=false;}}this.store.each(function(v){if(C){if(C.id==v.id){C=false;}return;}if(v.get(this.displayField)&&v.get(this.displayField).substring(0,1).toUpperCase()==k){A=this.store.indexOf(v); -return false;}},this);if(A===false){return true;}this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0]);sn.scrollIntoView(sn.dom.parentNode,false);}}); +return false;}},this);if(A===false){return true;}this.view.select(A);var sn=Roo.get(this.view.getSelectedNodes()[0]);sn.scrollIntoView(sn.dom.parentNode,false);},cleanLeadingSpace:function(e){return;}}); // Roo/form/ComboBoxArray.js Roo.form.ComboBoxArray=function(A){this.addEvents({'beforeremove':true,'remove':true});Roo.form.ComboBoxArray.superclass.constructor.call(this,A);this.items=new Roo.util.MixedCollection(false);};Roo.extend(Roo.form.ComboBoxArray,Roo.form.TextField,{lastData:false,inputType:'hidden',width:300,name:false,hiddenName:false,items:false,hiddenEl:false,el:false,onRender:function(ct,A){this.combo.hiddenName=this.hiddenName?(this.hiddenName+'-subcombo'):this.hiddenName; this.combo.name=this.name?(this.name+'-subcombo'):this.name;this.combo=Roo.factory(this.combo,Roo.form);this.combo.onRender(ct,A);if(typeof(this.combo.width)!='undefined'){this.combo.onResize(this.combo.width,0);}this.combo.initEvents();this.store=this.combo.store; -- 2.39.2