Focus StealingHow can I sto
November 20, 2008 3:17 PM   Subscribe

How can I stop websites from switching focus from one text box to another when they finish loading?

Here's what gets on my nerves:

1. I go to a website that requires login.

2. I type my username into text box #1.

3. I tab to box #2 and start typing my password.

4. The page finishes loading and bumps the cursor back to box #1.

5. I type half my password into the username field, revealing it to everyone standing nearby. I curse the ancestors of the person who decided that focus should be able to be changed by anything other than a user action.

Gmail is the worst offender for this. Does anyone know how to prevent it? I'm using Firefox.
posted by hayvac to Computers & Internet (5 answers total) 3 users marked this as a favorite
 
Before you start typing your username, hit ESC to stop the rest of the page from loading. Obviously you don't need to see the rest of the page if you're ready to login.
posted by desjardins at 3:26 PM on November 20, 2008


It's done using Javacript.

However, disabling Javascript will effectively disable GMail.

You'd want to look at some way to block the .focus() events.

I found a script to Stop Form Focus but it's for Opera's User Javascript functionality, but I'm pretty sure it could be ported to something like GreaseMonkey.
posted by puddpunk at 4:41 PM on November 20, 2008


Actually, it seems that Greasemonkey and Opera user JS are compatable...

First, install Greasemonkey then try this link and click the Install button at the top-right corner.

Good luck!
posted by puddpunk at 4:52 PM on November 20, 2008 [1 favorite]


By the love of all that's holy, it works!

Thank you puddpunk!
posted by hayvac at 5:23 PM on November 20, 2008


Thank you puddpunk and thank you hayvac for askin'
posted by clarkie666 at 5:44 PM on November 20, 2008


« Older Taking a bat to Christmas   |   Weeklong trip to SW America: advice? Newer »
This thread is closed to new comments.