Last modified: 2009-07-11 03:01: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.
*** This bug has been marked as a duplicate of 1864 ***