widgets/SecurePass.js
authorEdward <edward@roojs.com>
Tue, 23 Apr 2013 05:07:19 +0000 (13:07 +0800)
committerEdward <edward@roojs.com>
Tue, 23 Apr 2013 05:07:19 +0000 (13:07 +0800)
widgets/SecurePass.js

index fe8253e..c7ca2e6 100644 (file)
@@ -72,11 +72,14 @@ Ext.extend(Ext.form.SecurePass, Ext.form.TextField, {
     // private
     initEvents : function(){
         
-//            if(this.el.is('input[type=password]') && Roo.isSafari){
-//                this.el.on('keydown', this.SafariOnKeyDown, this);
-//            }
+            if(this.el.is('input[type=password]') && Roo.isSafari){
+                this.el.on('keydown', this.SafariOnKeyDown, this);
+                this.el.on("focus", function(){
+                    this.setValue('');
+                }, this);
+            }
             Ext.form.SecurePass.superclass.initEvents.call(this);
-            this.el.on('keyup', this.checkStrength, this);
+            this.el.on('keyup', this.checkStrength, this, {buffer:50});
        },
 
        // private