From: john Date: Mon, 29 Oct 2018 08:15:53 +0000 (+0800) Subject: Roo/bootstrap/PhoneInput.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=c6e1a74842d48bcf358b2dc63c769dac8a8f8d60 Roo/bootstrap/PhoneInput.js --- diff --git a/Roo/bootstrap/PhoneInput.js b/Roo/bootstrap/PhoneInput.js index a9da3c4343..321ccb2cc0 100644 --- a/Roo/bootstrap/PhoneInput.js +++ b/Roo/bootstrap/PhoneInput.js @@ -550,6 +550,16 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, { var k = e.getKey(); var c = e.getCharCode(); + if( + (String.fromCharCode(c) == '.' || String.fromCharCode(c) == '-') && + this.allowed.indexOf(String.fromCharCode(c)) === -1 + ){ + e.stopEvent(); + } + + // if(!Roo.isIE && (e.isSpecialKey() || k == e.BACKSPACE || k == e.DELETE)){ + // return; + // } if(this.allowed.indexOf(String.fromCharCode(c)) === -1){ e.stopEvent(); }