From: john Date: Mon, 29 Oct 2018 08:30:51 +0000 (+0800) Subject: Roo/bootstrap/PhoneInput.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=ffbafa2e7540ab0ce3c4376b85ec1e549074c22c Roo/bootstrap/PhoneInput.js roojs-bootstrap.js roojs-bootstrap-debug.js --- diff --git a/Roo/bootstrap/PhoneInput.js b/Roo/bootstrap/PhoneInput.js index 0de5d61b2e..4b7723d5ef 100644 --- a/Roo/bootstrap/PhoneInput.js +++ b/Roo/bootstrap/PhoneInput.js @@ -296,7 +296,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("keyup", this.onKeyUp, this); - this.inputEl().on("keypress", this.onKeyPress, this); + this.inputEl().on("keydown", this.onKeyDown, this); this.tpl = '
  • {name} +{dialCode}
  • '; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 9fa6500c03..6a3245b484 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -40138,7 +40138,8 @@ 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.inputEl().on("keydown", this.onKeyDown, this); this.tpl = '
  • {name} +{dialCode}
  • '; @@ -40388,17 +40389,15 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { return this.el.select('input.hidden-tel-input',true).first(); }, - onKeyPress : function(e){ - + // after setting val + onKeyUp : function(e){ + this.setValue(this.getValue()); + }, + + onKeyDown : function(e){ if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){ e.stopEvent(); } - - Roo.log(this.getValue()); - - this.setValue(this.getValue()); - - Roo.log(this.getValue()); } }); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 0134aa6e61..3eb7e9c2c0 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -1645,7 +1645,7 @@ if(this.indicatorpos=='right'){I.cls='roo-required-indicator text-danger fa fa-l if(p){for(var i=0;i