FS#19635 - Autofocus search entry field

Attached to Project: AUR web interface
Opened by Jan Dlabal (y27) - Friday, 28 May 2010, 23:10 GMT
Last edited by Lukas Fleischer (lfleischer) - Friday, 27 May 2011, 15:57 GMT
Task Type Feature Request
Category Backend
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Architecture All
Severity Low
Priority Normal
Reported Version 1.6.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Hi Archers,

A small annoynace of AUR is that when the page loads, you have to click in the search field. As aur.archlinux.org is a page where search is very probably the most used feature, I think one should not have to do that.

The required modification is very simple -- just place an onLoad="document.searchform.K.focus()" in the body tag and specify the name in the form tag accordingly.

Thanks for looking into this.
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Friday, 27 May 2011, 15:57 GMT
Reason for closing:  Won't implement
Comment by Loui Chang (louipc) - Friday, 04 June 2010, 22:48 GMT
Is there another way?
I'm pretty intent on keeping javascript out of the AUR.
Comment by Jan Dlabal (y27) - Tuesday, 08 June 2010, 17:29 GMT
I don't think so, why? 99% of browsers today support it anyway.. and those that do not simply will ignore it.
Comment by Lukas Fleischer (lfleischer) - Tuesday, 22 June 2010, 13:53 GMT
In HTML5, there is an "autofocus" attribute [1] for form elements. In versions prior to HTML5, it cannot be done without using JavaScript.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofocusing-a-form-control

Loading...