As you know, I recently went a little berserk with iPhone-style password fields. I was thoroughly invigorated by the challenge of this seemingly simple idea. I wanted to write a plugin that would conquer and destroy the inadequate dPassword plugin from decaf (see link in previous posts)…mission accomplished my friends. *applause and bashing of heads*
Some fixes and differences from their version:
1. Adding/deleting characters in the middle works
2. Cursor position stays the same when you type or delete in the middle of a password.
3. Cursor position stays the same if you put the cursor somewhere besides the end before the timeout changes the last character.
4. When you do a select-all delete, it will not be buggy.
5. I’ve taken out the interval and debug options. If someone is knowledgeable enough to debug or change the interval, they can go into the code themselves so I don’t have to increase download size for everyone else.
6. You can have default values in the fields if you want. Just do it as you normally would, put it in the html…<input type=”password” value=”placeholder”/> and password123 takes care of it. It was better to do it this way than have an option for all elements because you can keep element-specific placeholders.