Focus on the text field when a note is opened
authorTom Hughes <tom@compton.nu>
Thu, 28 Mar 2013 15:12:53 +0000 (15:12 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Mar 2013 15:12:53 +0000 (15:12 +0000)
app/assets/javascripts/index/notes.js.erb

index 10e96df..9fb03bb 100644 (file)
@@ -41,6 +41,10 @@ $(document).ready(function () {
     }
   });
 
+  map.on("popupopen", function (e) {
+    $(e.popup._container).find(".comment").focus();
+  });
+
   map.on("popupclose", function (e) {
     if (newNote && e.popup == newNote._popup) {
       $(newNote).oneTime(10, "removenote", function () {