diff --git a/js/id/ui/preset/combo.js b/js/id/ui/preset/combo.js index c5b7f7c88..a078ee647 100644 --- a/js/id/ui/preset/combo.js +++ b/js/id/ui/preset/combo.js @@ -10,23 +10,24 @@ iD.ui.preset.combo = function(field) { input.enter().append('input') .attr('type', 'text') - .attr('id', 'preset-input-' + field.id); + .attr('id', 'preset-input-' + field.id) + .each(function() { + if (field.options) { + options(field.options); + } else { + iD.taginfo().values({ + key: field.key + }, function(err, data) { + if (!err) options(_.pluck(data, 'value')); + }); + } + }); input .on('change', change) .on('blur', change) .call(combobox); - if (field.options) { - options(field.options); - } else { - iD.taginfo().values({ - key: field.key - }, function(err, data) { - if (!err) options(_.pluck(data, 'value')); - }); - } - function options(opts) { combobox.data(opts.map(function(d) { var o = {};