]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/notes.js.erb
Focus on the text field when a note is opened
[rails.git] / app / assets / javascripts / index / notes.js.erb
index 10e96df189e69303c0dfb511e588bddc3f637ab2..9fb03bb0dd62af9ad4ec7c5be0a75a70fd0b20b4 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 () {
   map.on("popupclose", function (e) {
     if (newNote && e.popup == newNote._popup) {
       $(newNote).oneTime(10, "removenote", function () {