From: Richard Fairhurst Date: Sat, 8 Mar 2014 12:13:40 +0000 (+0000) Subject: Merge pull request #13 from danstowell/jsrouting-ffoxdragok X-Git-Tag: live~4223^2~33 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/3ddda7319c5e9f146a03ab86f1de8e32d9bae3ef?hp=5b6558c0f29013e85c9c398a61872f9dad5a69c5 Merge pull request #13 from danstowell/jsrouting-ffoxdragok fix firefox behaviour when dragging pointer from the tray to the map --- diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index fc8e8ff46..0a11b4899 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -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);