widgets/SecurePass.js
[Pman.Core] / widgets / SecurePass.js
index 9456975..bc203d5 100644 (file)
@@ -73,12 +73,12 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, {
     initEvents : function(){
             if(this.inputType == 'password'){
                 this.el.on('keydown',function(event){
-                    Roo.log(this);
-                    if(event.getKey() == 8){
+                    Roo.log(event.getKey());
+                    if((event.getKey() == 8 || event.getKey() == 46) && this.getValue().length == 1){ // backspace and delete key
                         event.preventDefault();
-                        //this.setValue('');
+                        this.setValue('');
                     };
-                },this);
+                },this, {buffer:50});
             }
             Ext.form.SecurePass.superclass.initEvents.call(this);
             this.el.on('keyup', this.checkStrength, this, {buffer:50});