-
5 Dec 2007 10:55 AM #1
[2.0] TextField inputType password encodes characters from emptyText property
[2.0] TextField inputType password encodes characters from emptyText property
If you set up a TextField with inputType = password, value = "" and emptyText = "Some hint to be displayed", emptyText will show up with password chars (*)
Last edited by pibos; 5 Dec 2007 at 11:08 AM. Reason: missing version number from title
-
5 May 2008 12:01 AM #2
-
9 Nov 2009 6:21 AM #3
-
10 Nov 2009 12:28 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 44
-
13 Jan 2010 10:03 AM #5
This is still the case for ExtJS 3.1.0.
Is there already a workaround?
-
25 Feb 2011 3:41 PM #6
What I do is add a focus and blur event and implement some logic to switch the input type from password to text.
i.e. Ext.getDom('txtPassword').type = "text";
-
17 Apr 2011 11:15 AM #7
this works
this works
I'm no pro, so take this for what it's worth... a dirty solution that works.
The idea is to toggle the field between inputType text and password. The important settings are: id, enableKeyEvents: true, and adding a listener on the keyup event.
Code:var createAccountPasswordField = new Ext.form.TextField({renderTo:'createAccountPasswordDiv',id: 'createAccountPasswordField',maxLength:15,width:230,tabIndex: 2, emptyText: 'Make it strong!', enableKeyEvents: true, style: "padding-left: 10px; height: 40px; font-size: 20px;", listeners: { keyup: function(){ if( createAccountPasswordField.getValue().length > 0 ){ Ext.getDom('createAccountPasswordField').type = "password"; } else { Ext.getDom('createAccountPasswordField').type = "text"; } } } });


Reply With Quote