]> git.openstreetmap.org Git - rails.git/commit
Restore autofocusing of the search field
authorTom Hughes <tom@compton.nu>
Tue, 10 Dec 2013 19:45:28 +0000 (19:45 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 10 Dec 2013 19:45:28 +0000 (19:45 +0000)
commit9cc9a0098840363b6497337951b53aa583f4aa44
tree2d61d6a6c2f6c892cd9e48c60d1b562301e2e359
parentc2c817ad1f23cac3323044708f723125a1ca5fd6
Restore autofocusing of the search field

Use the HTML5 autofocus attribute, and focus on load for browsers
which don't support it.

Also change the removal of the "Where am I?" prompt to happen on
input rather than when the field is focused, so that it is properly
removed and restored when the field has been autofocused.

Fixes https://trac.openstreetmap.org/ticket/5065
app/assets/javascripts/index.js
app/assets/javascripts/index/search.js
app/views/layouts/_search.html.erb