Fix enter key on feature list

This commit is contained in:
John Firebaugh
2013-08-13 16:52:25 -07:00
parent 9b84a0874b
commit bfd89e2d14
+4 -3
View File
@@ -9,9 +9,10 @@ iD.ui.FeatureList = function(context) {
.text(t('inspector.feature_list'));
function keypress() {
var q = search.property('value');
if (d3.event.keyCode === 13 && q.length) {
click(list.selectAll('.feature-list-item:first-child').datum().entity);
var q = search.property('value'),
items = list.selectAll('.feature-list-item');
if (d3.event.keyCode === 13 && q.length && items.size()) {
click(items.datum().entity);
}
}