We have a search field. It works like your normal everyday search field on many websites. BUT, there are two schools of thought over how to handle what happens when the user clicks in the field to adjust their search query after running their search at least once.

  1. User clicks in the search field and everything they have previously entered is selected. Type a single character and the entire entry is replaced with the character. See the search at MS clipart (I know, I know) as an example: http://office.microsoft.com/en-us/images/?CTT=97
  2. User clicks in the search field and everything they have previously entered is untouched. Type a single character and the entire entry remains with the single character appearing wherever the cursor entered the character string. Run a search at the ID blog as an example: http://www.interaction-design.org/

What are pros and cons for the two approaches?

3 Answers 3


IMHO a search input field should behave like any other text input field: don't select anything on click but select all if it gains the focus by pressing tab.

For me it is very annoying if I click in the Firefox' address bar to change the url, but it always selects all.

BTW, I also hate it if I Alt-Tab from a different application and the text is now completely selected.

  • I think you hit the nail on the head. It struck me as a change in input field behavior from what would be generally expected by the user.
    – gef05
    Aug 19, 2011 at 18:45

It really depends on what the user is trying to accomplish and what your system is set up to do. Do they want to make multiple searches with wildly different input? Or do they want to narrow their search input more and more until they see what they want?

Google Chrome's URL bar highlights the entire URL. Why? Because I want to load a new page. Google.com's search box doesn't highlight, because I want to refine my search terms.

Maybe a timeout or multiple regions would allow the input to guess the user's intention and do one or the other. But, of course, this could just add confusion.


Slightly modifying the search criteria is a very common scenario on most search features. Perhaps because of a mistype, to add a keyword, or remove an extraneous word. So I prefer option 2 for normal everyday websites.

Generally, if the user has found what they wanted and are starting an entirely new search, then they have already navigated to another page and the search field is already blank (if the search is available on every page).

Sidebar: For mobile devices especially, I like the (X) icon that displays in the right of search fields (like the one found in Apple products). Comes in handy often.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.