From: Tom Hughes Date: Thu, 28 Mar 2013 15:12:53 +0000 (+0000) Subject: Focus on the text field when a note is opened X-Git-Tag: live~5104^2~8 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/0a4b8604804f5e586718c6224700dde31afae090?hp=d00994d1511026b1540ecc14a9187b0c19a757b9 Focus on the text field when a note is opened --- diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 10e96df18..9fb03bb0d 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -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 () {