From 16fb98de127fedfa2a6742027ff0900b6c763e98 Mon Sep 17 00:00:00 2001 From: john Date: Thu, 19 Apr 2018 12:02:05 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js --- roojs-bootstrap-debug.js | 7 ++++--- roojs-bootstrap.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 5a2b42b7ae..ceefebb6b3 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -39491,7 +39491,7 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { this.list.on('mouseover', this.onViewOver, this); this.list.on('mousemove', this.onViewMove, this); - this.inputEl().on("keypress", this.onKeyPress, this); + this.inputEl().on("keyup", this.onKeyUp, this); this.tpl = '
  • {name} +{dialCode}
  • '; @@ -39738,16 +39738,17 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { return this.el.select('input.hidden-tel-input',true).first(); }, - onKeyPress : function(e){ + onKeyUp : function(e){ var k = e.getKey(); var c = e.getCharCode(); + Roo.log(c); + if( (String.fromCharCode(c) == '.' || String.fromCharCode(c) == '-') && this.allowed.indexOf(String.fromCharCode(c)) === -1 ){ - Roo.log(c); e.stopEvent(); } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 110e57e786..114d62f6b9 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1614,7 +1614,7 @@ J.cn=[K,I];}if(B=='left'){H={tag:'div',cn:[H]};if(this.labelWidth>12){J.style="w ,{'name':'dialCode','type':'string'},{'name':'priority','type':'string'},{'name':'areaCodes','type':'string'}]})});if(!this.preferedCountries){this.preferedCountries=['hk','gb','us'];}var p=this.preferedCountries.reverse();if(p){for(var i=0;i