diff --git a/js/id/ui/raw_tag_editor.js b/js/id/ui/raw_tag_editor.js index 4feaf5c1e..9b854d338 100644 --- a/js/id/ui/raw_tag_editor.js +++ b/js/id/ui/raw_tag_editor.js @@ -86,24 +86,6 @@ iD.ui.RawTagEditor = function(context) { $items.order(); - $items.select('input.key') - .property('value', function(d) { - return d.key; - }) - .on('blur', keyChange) - .on('change', keyChange); - - $items.select('input.value') - .property('value', function(d) { - return d.value; - }) - .on('blur', valueChange) - .on('change', valueChange) - .on('keydown.push-more', pushMore); - - $items.select('button.remove') - .on('click', removeTag); - $items.each(function(tag) { d3.select(this) .each(bindTypeahead) @@ -111,6 +93,20 @@ iD.ui.RawTagEditor = function(context) { .call(tag.reference.body); }); + $items.select('input.key') + .property('value', function(d) { return d.key; }) + .on('blur', keyChange) + .on('change', keyChange); + + $items.select('input.value') + .property('value', function(d) { return d.value; }) + .on('blur', valueChange) + .on('change', valueChange) + .on('keydown.push-more', pushMore); + + $items.select('button.remove') + .on('click', removeTag); + $items.exit() .remove();