Merge branch 'develop' into lang-attributes

# Conflicts:
#	modules/ui/commit_warnings.js
#	modules/ui/field.js
#	modules/ui/fields/wikidata.js
#	modules/ui/fields/wikipedia.js
#	modules/ui/full_screen.js
#	modules/ui/panels/history.js
#	modules/ui/sections/entity_issues.js
#	modules/ui/sections/map_features.js
#	modules/ui/sections/raw_member_editor.js
#	modules/ui/sections/validation_rules.js
#	modules/ui/tag_reference.js
This commit is contained in:
Quincy Morgan
2020-09-22 10:55:07 -04:00
78 changed files with 744 additions and 436 deletions
+11 -7
View File
@@ -388,6 +388,12 @@ export function uiCommit(context) {
.on('click.save', function() {
if (!d3_select(this).classed('disabled')) {
this.blur(); // avoid keeping focus on the button - #4641
for (var key in context.changeset.tags) {
// remove any empty keys before upload
if (!key) delete context.changeset.tags[key];
}
context.uploader().save(context.changeset);
}
});
@@ -547,14 +553,12 @@ export function uiCommit(context) {
k = context.cleanTagKey(k);
if (readOnlyTags.indexOf(k) !== -1) return;
if (k !== '' && v !== undefined) {
if (onInput) {
tags[k] = v;
} else {
tags[k] = context.cleanTagValue(v);
}
} else {
if (v === undefined) {
delete tags[k];
} else if (onInput) {
tags[k] = v;
} else {
tags[k] = context.cleanTagValue(v);
}
});