]> git.openstreetmap.org Git - rails.git/commitdiff
Exchange focus between home location delete/undelete buttons
authorAnton Khorev <tony29@yandex.ru>
Thu, 10 Aug 2023 00:24:25 +0000 (03:24 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 11 Aug 2023 18:47:14 +0000 (21:47 +0300)
app/assets/javascripts/user.js

index f6c4151857fef2c9bb6dad0bff9ecf14f18ed422..c306273e5f728ddb7acee93cfbfd918066c08aeb 100644 (file)
@@ -96,6 +96,7 @@ $(document).ready(function () {
         deleted_lat = lat;
         deleted_lon = lon;
         respondToHomeUpdate();
+        $("#home_undelete").trigger("focus");
       });
 
       $("#home_undelete").click(function () {
@@ -104,6 +105,7 @@ $(document).ready(function () {
         deleted_lat = null;
         deleted_lon = null;
         respondToHomeUpdate();
+        $("#home_delete").trigger("focus");
       });
     } else {
       $("[data-user]").each(function () {