Last modified: 2009-07-11 03:01:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8165, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6165 - Search box to gain initial focus on main page
Search box to gain initial focus on main page
Status: RESOLVED DUPLICATE of bug 1864
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.16.x
PC Windows XP
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/Main_Page
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-01 17:43 UTC by Dbeattie
Modified: 2009-07-11 03:01 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dbeattie 2006-06-01 17:43:26 UTC
When visiting the "Main Page" for English
(http://en.wikipedia.org/wiki/Main_Page), it would be nice if the cursor
automatically appeared in the search box like it does for the home page
(http://www.wikipedia.org/). Without this, each person must first click on the
search box before starting to type any search terms.

This can be fixed by adding the following JavaScript to the wikibits.js file in
the runOnloadHook() function just before the "Run any added-on functions" section.

// Send focus to search box by default.
var sInput = document.getElementById("searchInput");
if (typeof sInput != 'undefined') {
	sInput.focus();
}

NOTE: This may scroll the page depending on the location of the search box. For
example, in the print layout the page scrolls down to the search box.
Comment 1 Brion Vibber 2006-06-01 18:00:46 UTC

*** This bug has been marked as a duplicate of 1864 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links