[OpenStreetMap] #5065: Search field on http://www.openstreetmap.org should autofocus

OpenStreetMap trac at noreply.openstreetmap.org
Tue Dec 10 09:26:12 UTC 2013

#5065: Search field on http://www.openstreetmap.org should autofocus
  Reporter:  Vinnl        |      Owner:  rails-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  minor        |  Milestone:
 Component:  website      |    Version:
Resolution:               |   Keywords:

Comment (by TomH):

 I have to say I remain entirely unconvinced by the claim that the first
 thing most people will do is to search. That might possibly be true for
 new users but I very much doubt it is for returning users.

 What I can say is that overall we have five times more visitors to the
 front page than we do searches, and that includes all searches not just
 those made immediately after arriving on the front page.

 The real problem however, given that regardless of how important you think
 this is there is little real downside, is that the new site design
 includes placeholder text in the search field which will, to some extent,
 conflict with autofocusing.

 What I'm not sure about yet is how much. Certainly in Firefox at least it
 appears to be safe to use HTML5 autofocus as no focus event will be
 generated (that would fade out the placeholder) until the user starts to
 type. Whether that is true in other browsers needs to be determined.

 In older browsers we used to focus via javascript instead, but that would
 almost certainly generate a focus event. Then again I guess the
 placeholder text (which is generated by an HTML5 placeholder attribute)
 may not show there anyway.

Ticket URL: <https://trac.openstreetmap.org/ticket/5065#comment:1>
OpenStreetMap <http://www.openstreetmap.org/>
OpenStreetMap is a free editable map of the whole world

More information about the rails-dev mailing list