]> git.openstreetmap.org Git - rails.git/commitdiff
Make the sharing controls read-only
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 6 Sep 2023 14:59:23 +0000 (15:59 +0100)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 6 Sep 2023 17:10:02 +0000 (18:10 +0100)
They aren't used for inputting any information, only for copying.

app/assets/javascripts/leaflet.share.js

index 5fb189a7684765655115c54fe1d31f9b548f6522..c096a92fcf725b4d2ce3e2d144416cfcdfe726fc 100644 (file)
@@ -69,6 +69,7 @@ L.OSM.share = function (options) {
         .attr("id", "long_input")
         .attr("type", "text")
         .attr("class", "form-control form-control-sm font-monospace")
+        .attr("readonly", true)
         .on("click", select));
 
     $("<div>")
@@ -79,6 +80,7 @@ L.OSM.share = function (options) {
         .attr("id", "short_input")
         .attr("type", "text")
         .attr("class", "form-control form-control-sm font-monospace")
+        .attr("readonly", true)
         .on("click", select));
 
     $("<div>")
@@ -89,6 +91,7 @@ L.OSM.share = function (options) {
         $("<textarea>")
           .attr("id", "embed_html")
           .attr("class", "form-control form-control-sm font-monospace")
+          .attr("readonly", true)
           .on("click", select))
       .append(
         $("<p>")