Remove results from geocoder on hiding. Fixes #1112

This commit is contained in:
Tom MacWright
2013-03-25 15:26:59 -04:00
parent 4222256c78
commit a7d4090c68
+4
View File
@@ -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();