Friday, July 31, 2009

SetFocus()

When I login to the multiple websites, I'm impatient. Impatient of the jazzy flash to load, for the Ads to be fetched. As soon as I see the Username and Password fields get rendered, I start typing and hit Enter. Many of you would have encountered this problem. When one starts typing the password, the client sets the focus in the Username text box. Result, I end up typing the password in clear text. More over, it gets cached by the browser.

So yeah,
1) Is there a way to avoid this late focus? Can't the code be written to set the focus as soon as the component is created!
2) Is it a problem with the code or the browser?
3) How about making Username text box also masked with "*" character. When one can type long passwords with special characters correctly, (s)he can very well type the Username correctly.
4) Why does this late focus happens? Technically!!

P.S. I've got three UI developers in my home. :-)

Update: psankar commented a cool tip,
one thing that you can do after this has happened is, you can do a shift+del, to delete that entry alone from autocompletion list.

Many people dont know this and end up clearing full history.

8 comments:

Puthali said...

+1, I also suffer from the same problem...

Amudhan said...

I have a simpler solution for that... Set master password for Firefox and add your passwords for the sites you go. When you first go to a page which requires your password, it will prompt for the master password and you can input that. Afterwards, all the username/password will be auto-populated... how is this?

Sankar said...

one thing that you can do after this has happened is, you can do a shift+del, to delete that entry alone from autocompletion list.

Many people dont know this and end up clearing full history.

Vijesh said...

@sankar Wow! Thats a cool tip.

Varunkumar Nagarajan said...

Shift + Del works in address bar as well.. Sometimes, it had happened to me that I had typed in my password there...

Varunkumar Nagarajan said...

Another problem on the similar lines: Many sites use email id as user name and if u r an internet addict, there are chances that u give ur mail password in other services. My friend gave his password to one of a test service I wrote. :)

Arun Raghavendar said...

I know I am late here, but I use a simpler solution across all browsers. I simply press escape (twice or thrice) before entering my username/password. Doing this will stop the browser execution so the setFocus() on user-name will never happen.

Hope that helps...

Vijesh said...

@Varun
yeah good enhancement to shift+del.

Poor boy, give him some pwd mgmt tips. Btw, how did you find it was his e-mail pwd? ;)

@arun
Thats a cool work around again.