// private
initEvents : function(){
if(this.inputType == 'password'){
- this.el.on('keyup',function(event){
- Roo.log('before');
- Roo.log(this.el.getValue());
+ this.el.on('keydown',function(event){
+ Roo.log(this.getValue().length);
Roo.log(this.el.getValue().length);
- if(event.getKey() == 8){
- Roo.log('in');
- Roo.log(this.el.getValue());
- Roo.log(this.el.getValue().length);
+ if((event.getKey() == 8 || event.getKey() == 46) && this.getValue().length ==1){ // backspace and delete key
event.preventDefault();
this.setValue('');
};
},this);
}
Ext.form.SecurePass.superclass.initEvents.call(this);
- //this.el.on('keyup', this.checkStrength, this, {buffer:50});
+ this.el.on('keyup', this.checkStrength, this, {buffer:50});
},
// private