From bc67479bccbd09b6f6279224e549d5142fc800a0 Mon Sep 17 00:00:00 2001 From: Dan Stowell Date: Sun, 9 Mar 2014 15:06:08 +0000 Subject: [PATCH] jsrouting: clear search boxes on page unload --- app/assets/javascripts/router.js | 3 +++ 1 file changed, 3 insertions(+) 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; }; -- 2.39.5