Auto Focusing on Search Fields (don’t do it)
I’ve been a Dreamhost customer for a long time; I think it’s by far one of the best hosts in its price range. Service, support, and especially their control panel have kept me a happy user.
That having been said, there’s always something, right?
Dreamhost’s control panel does a great job of making it easy to find just about any feature they offer, and often makes tasks that, in other control panels, can otherwise be a daunting puzzle (like changing a domain’s DNS records) pleasant ones.
Unfortunately every time you load a new page, it automatically places the cursor in the search field.
Why is this a problem?
Like a lot of people, I do a lot of page navigation with my keyboard. The space bar pages you down, the down arrow moves you down in smaller increments. Shift-space pages you up. Command-up brings you to the top of the page, command-down to the bottom. Backspace/delete takes you back to the previous page.
None of these work if the cursor is already engaged — if it’s already focused on an HTML element that allows for typing, like, say, a search field.
The result being that when using Dreamhost’s control panel my behavior looks something like this:
- Click to open new page.
- Hit space bar to scroll through my unfortunately-long list of domains.
- Realize the search field is engaged and that I’m typing spaces into it.
- Be irked.
- Hit tab (or click on any non-link part of the page) to dis-engage the search field.
- Go about my business.
On some web pages (like the google.com home page) it’s perfectly fair to make the assumption that the first thing people will want to do is type. But not on most.