var input = {
tag: 'input',
id : id,
- type: 'number',
+ // type: 'number', -- do not use number - we get the flaky up/down arrows.
maxlength: this.max_length,
cls : 'form-control tel-input',
autocomplete: 'new-password'
this.list.on('mouseover', this.onViewOver, this);
this.list.on('mousemove', this.onViewMove, this);
this.inputEl().on("keyup", this.onKeyUp, this);
- this.inputEl().on("keydown", this.onKeyDown, this);
+ this.inputEl().on("keypress", this.onKeyPress, this);
this.tpl = '<li><a href="#"><div class="flag {iso2}"></div>{name} <span class="dial-code">+{dialCode}</span></a></li>';
this.setValue(this.getValue());
},
- onKeyDown : function(e){
+ onKeyPress : function(e){
if(this.allowed.indexOf(String.fromCharCode(e.getCharCode())) === -1){
e.stopEvent();
}