]> git.openstreetmap.org Git - rails.git/commitdiff
Merge pull request #13 from danstowell/jsrouting-ffoxdragok
authorRichard Fairhurst <richard@systemeD.net>
Sat, 8 Mar 2014 12:13:40 +0000 (12:13 +0000)
committerRichard Fairhurst <richard@systemeD.net>
Sat, 8 Mar 2014 12:13:40 +0000 (12:13 +0000)
fix firefox behaviour when dragging pointer from the tray to the map

app/assets/javascripts/index.js

index fc8e8ff465c662e2b8deb46304f51e3f6702fd65..0a11b489989f67dbf7a2133a80c0137e4f26b45c 100644 (file)
@@ -357,7 +357,7 @@ $(document).ready(function () {
     $(".routing").show();
     $(".query_wrapper.routing [name=route_from]").focus();
     $("#map").on('dragend dragover',function(e) { e.preventDefault(); });
-    $("#map").on('drop',function(e) { OSM.routing.handleDrop(e); });
+    $("#map").on('drop',function(e) { OSM.routing.handleDrop(e); e.preventDefault(); });
     $(".routing_marker").on('dragstart',function(e) {
     e.originalEvent.dataTransfer.effectAllowed = 'move';
       e.originalEvent.dataTransfer.setData('id', this.id);