Page MenuHomePhabricator

Focus cursor in search box when accessing search page
Closed, ResolvedPublic

Description

Author: frank_skare

Description:
Main page don't set focus to be able to scoll using up/down. Scrolling isn't needed on the search page so the input box can be focused.

http://en.wikipedia.org/wiki/Special:Search


Version: unspecified
Severity: enhancement

Details

Reference
bz9939

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:36 PM
bzimport added a project: MediaWiki-Search.
bzimport set Reference to bz9939.
bzimport added a subscriber: Unknown Object (MLST).

Scrolling certainly is needed on the search page when viewing a list of results.

Might be handy when no search has been made, though.

frank_skare wrote:

Most search related sites set focus even for scrollable pages, I thing this is sane. What about the blank search page?

frank_skare wrote:

Most search related sites set focus even for scrollable pages, if somebody really wants to scroll with up/down pressing the tab key to move the focus away from the input box should not be a issue.

Neither Google nor Yahoo do, so I'm curious what majority you're thinking of. :)

ilglists wrote:

Having the cursor be active in the search form would save me dozens, sometimes hundreds, of keystrokes (tabs) a day. Merriam-Webster (http://unabridged.merriam-webster.com) does this automatically after the first search.

johan.m.bergman wrote:

Brion Vibber, according to my experience both Google and Yahoo are focusing the cursor. I can go to their main pages and start typing immediately, without having to focus manually on the search box. And I think it is great and hope that e.g. Wikipedia will also be able to have this!

I can confirm that both Yahoo and Google behave as I would expect, that is:

  1. Their search entry portal, which is search-focused and has a search box at the top as primary content, sets focus to the search box.

and

  1. Their search result pages do not set focus.

Done on trunk in r29201.

Needs to be done for Lucene extension since we haven't yet merged the client fully for Wikimedia usage.

Done in LuceneSearch in r29202.