mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-21 19:26:41 +02:00
Fix enter key on feature list
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user