From: john Date: Mon, 29 Oct 2018 08:23:37 +0000 (+0800) Subject: Roo/bootstrap/PhoneInput.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=01184063a94966dc03addb0e5b01a8898a7d885d Roo/bootstrap/PhoneInput.js roojs-bootstrap.js roojs-bootstrap-debug.js --- diff --git a/Roo/bootstrap/PhoneInput.js b/Roo/bootstrap/PhoneInput.js index b5621f1490..6c4ea1de3a 100644 --- a/Roo/bootstrap/PhoneInput.js +++ b/Roo/bootstrap/PhoneInput.js @@ -547,14 +547,9 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { }, onKeyUp : function(e){ - - if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ - e.stopEvent(); - } + this.setValue(this.getValue()); Roo.log(this.getValue()); - - this.setValue(this.getValue()); }, onKeyPress : function(e){ @@ -562,6 +557,8 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ e.stopEvent(); } + + Roo.log(this.getValue()); } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 133b6dd55b..d398e3e34e 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -40390,14 +40390,9 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { }, onKeyUp : function(e){ - - if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ - e.stopEvent(); - } + this.setValue(this.getValue()); Roo.log(this.getValue()); - - this.setValue(this.getValue()); }, onKeyPress : function(e){ @@ -40407,8 +40402,6 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { } Roo.log(this.getValue()); - - this.setValue(this.getValue()); } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 0ed5389b87..32bd131eed 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1658,8 +1658,7 @@ if(!d){return false;}return d;},setDialCode:function(v){this.dialCodeHolder.dom. }return v;},setValue:function(v){var d=this.getDialCode(v);if(v.length==0||!d||d.length==0){if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);this.hiddenEl().dom.value=(v===null||v===undefined?'':v);}return;}this.setFlagClass(this.dialCodeMapping[d].iso2); this.setDialCode(d);this.inputEl().dom.value=v.replace('+'+d,'');this.hiddenEl().dom.value=this.getValue();this.validate();},getDialCode:function(v){v=v||'';if(v.length==0){return this.dialCodeHolder.dom.value;}var A="";if(v.charAt(0)!="+"){return false;} var B="";for(var i=1;i