avoid flashing geocoder results list when closing

fixes #993
This commit is contained in:
Ansis Brammanis
2013-03-13 12:06:41 -04:00
parent 5c242aa855
commit 90a35a8b76

View File

@@ -78,7 +78,9 @@ iD.ui.Geocoder = function(context) {
if (show !== shown) {
button.classed('active', show);
gcForm.call(iD.ui.Toggle(show));
if (!show) resultsList.call(iD.ui.Toggle(show));
if (!show && !resultsList.classed('hide')) {
resultsList.call(iD.ui.Toggle(show));
}
if (show) inputNode.node().focus();
else inputNode.node().blur();
shown = show;