From: Tom Hughes Date: Mon, 2 Apr 2018 14:41:35 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/1804' X-Git-Tag: live~3680 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/be35dda9c36904779a1f34d417e4d7357b1e4415?hp=-c Merge remote-tracking branch 'upstream/pull/1804' --- be35dda9c36904779a1f34d417e4d7357b1e4415 diff --combined app/assets/javascripts/index/directions.js index 1057fa58d,392183cc6..2b3319f8f --- a/app/assets/javascripts/index/directions.js +++ b/app/assets/javascripts/index/directions.js @@@ -40,7 -40,8 +40,8 @@@ OSM.Directions = function (map) shadowUrl: OSM.MARKER_SHADOW, shadowSize: [41, 41] }), - draggable: true + draggable: true, + autoPan: true }); endpoint.marker.on('drag dragend', function (e) { @@@ -53,10 -54,6 +54,10 @@@ } }); + input.on("keydown", function() { + input.removeClass("error"); + }); + input.on("change", function (e) { awaitingGeocode = true; @@@ -90,8 -87,7 +91,8 @@@ endpoint.awaitingGeocode = false; endpoint.hasGeocode = true; if (json.length === 0) { - alert(I18n.t('javascripts.directions.errors.no_place')); + input.addClass("error"); + alert(I18n.t('javascripts.directions.errors.no_place', {place: endpoint.value})); return; }