Don't focus when hiding

This commit is contained in:
John Firebaugh
2013-07-25 20:36:48 -07:00
parent 5cd13c8e12
commit d82a23e5a9

View File

@@ -149,8 +149,9 @@ iD.ui.Background = function(context) {
function toggle() {
if (d3.event) d3.event.preventDefault();
tooltip.hide(button);
setVisible(!button.classed('active'));
content.selectAll('.toggle-list label:first-child').node().focus();
var visible = !button.classed('active');
setVisible(visible);
if (visible) content.selectAll('.toggle-list label:first-child').node().focus();
}
function setVisible(show) {