X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fbootstrap%2FPhoneInput.js;h=321ccb2cc04efef3a400ab9d623fe02ec6e7e1a1;hb=c6e1a74842d48bcf358b2dc63c769dac8a8f8d60;hp=a9da3c43436ba9d08750300b6c2cb6312c35e83a;hpb=72a08668a50a7aa67dc8863904660871cafb0d37;p=roojs1 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(); }