From a64781578a2ec658c50590be846869bd0a8e4b37 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 5 Jul 2020 18:54:52 +0200 Subject: [PATCH] remove newlines from coordinates popup due to chrome bug making it impossible to copy from alertbox when it has newlines --- src/static_src/js/kfmap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static_src/js/kfmap.js b/src/static_src/js/kfmap.js index 70d1d80f..ad601d3b 100644 --- a/src/static_src/js/kfmap.js +++ b/src/static_src/js/kfmap.js @@ -134,7 +134,7 @@ }); map.addEventListener("contextmenu", (event) => { - alert("Lat: " + lat + " Lng: " + lng + '\n\nGeoJSON:\n{ "type": "Point", "coordinates": [ ' + lng + ', ' + lat + ' ] }'); + alert("Lat: " + lat + " Lng: " + lng + ' - GeoJSON: { "type": "Point", "coordinates": [ ' + lng + ', ' + lat + ' ] }'); return false; // To disable default popup. });