fix updating tags from taglist

fixes #965
This commit is contained in:
Ansis Brammanis
2013-03-10 01:40:47 -05:00
parent 6440905e36
commit cb887f47e3
2 changed files with 10 additions and 3 deletions
-1
View File
@@ -117,7 +117,6 @@ iD.ui.TagEditor = function(context) {
}
function apply() {
event.changeTags();
event.close();
}
+10 -2
View File
@@ -70,7 +70,10 @@ iD.ui.Taglist = function(context) {
.attr('class', 'key')
.attr('maxlength', 255)
.property('value', function(d) { return d.key; })
.on('change', function(d) { d.key = this.value; event.change(); });
.on('blur', function(d) {
d.key = this.value;
event.change(taglist.tags());
});
inputs.append('span')
.attr('class', 'input-wrap-position')
@@ -79,7 +82,10 @@ iD.ui.Taglist = function(context) {
.attr('class', 'value')
.attr('maxlength', 255)
.property('value', function(d) { return d.value; })
.on('change', function(d) { d.value = this.value; event.change(); })
.on('blur', function(d) {
d.value = this.value;
event.change(taglist.tags());
})
.on('keydown.push-more', pushMore);
inputs.each(bindTypeahead);
@@ -251,6 +257,8 @@ iD.ui.Taglist = function(context) {
function removeTag(d) {
var tags = taglist.tags();
tags[d.key] = '';
event.change(tags);
delete tags[d.key];
drawTags(tags);
}