From: Dan Stowell Date: Sun, 9 Mar 2014 15:06:08 +0000 (+0000) Subject: jsrouting: clear search boxes on page unload X-Git-Tag: live~4781^2~20^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/bc67479bccbd09b6f6279224e549d5142fc800a0 jsrouting: clear search boxes on page unload --- diff --git a/app/assets/javascripts/router.js b/app/assets/javascripts/router.js index 9657549b1..05e47c356 100644 --- a/app/assets/javascripts/router.js +++ b/app/assets/javascripts/router.js @@ -174,6 +174,9 @@ OSM.Router = function(map, rts) { map.on('moveend baselayerchange overlaylayerchange', router.updateHash); $(window).on('hashchange', router.hashUpdated); + $(window).on('unload', function(e) { + $(".query_wrapper.routing input").val(""); + }); return router; };