]> git.openstreetmap.org Git - rails.git/commitdiff
Auto-select share link text
authorJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 9 Jul 2013 22:55:04 +0000 (15:55 -0700)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Thu, 18 Jul 2013 17:45:17 +0000 (10:45 -0700)
app/assets/javascripts/leaflet.share.js

index a5e93a13946973622380985f82e6c58d5ca69b91..e34d5ffdb67c442d1b19fdfe6862768c4e60fe42 100644 (file)
@@ -38,6 +38,7 @@ L.OSM.share = function (options) {
 
     var $input = $('<input />')
       .attr('type', 'text')
 
     var $input = $('<input />')
       .attr('type', 'text')
+      .on('click', select)
       .appendTo($share_link);
 
     var $list = $('<ul>')
       .appendTo($share_link);
 
     var $list = $('<ul>')
@@ -79,6 +80,10 @@ L.OSM.share = function (options) {
       );
     }
 
       );
     }
 
+    function select() {
+      $(this).select();
+    }
+
     return $container[0];
   };
 
     return $container[0];
   };