]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Fix notes page in data browser to match new site style
[rails.git] / app / assets / javascripts / index.js
index c908f1e3490353d72d53d067e2ad614ff8560aa7..dc5c40bf2eb5d8af589c7885fa7de25077714f97 100644 (file)
@@ -2,6 +2,7 @@
 //= require index/browse
 //= require index/export
 //= require index/key
+//= require index/notes
 
 $(document).ready(function () {
   var permalinks = $("#permalink").html();
@@ -128,4 +129,10 @@ $(document).ready(function () {
   if ($("#query").val()) {
     $("#search_form").submit();
   }
+
+  // Focus the search field for browsers that don't support
+  // the HTML5 'autofocus' attribute
+  if (!("autofocus" in document.createElement("input"))) {
+    $("#query").focus();
+  }
 });