From a7d4090c687478412b766b005ed5d279a6195fdc Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Mon, 25 Mar 2013 15:26:59 -0400 Subject: [PATCH] Remove results from geocoder on hiding. Fixes #1112 --- js/id/ui/geocoder.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index d41228ca2..9206ff53c 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -82,6 +82,10 @@ iD.ui.Geocoder = function(context) { gcForm.call(iD.ui.Toggle(show)); if (!show && !resultsList.classed('hide')) { resultsList.call(iD.ui.Toggle(show)); + // remove results so that they lose focus. if the user has + // tabbed into the list, then they will have focus still, + // even if they're hidden. + resultsList.selectAll('span').remove(); } if (show) inputNode.node().focus(); else inputNode.node().blur();