Cleanup style, make sure multilingual fields always render

This commit is contained in:
Bryan Housel
2018-11-26 17:13:55 -05:00
parent 9341e477a6
commit df91eb2959
3 changed files with 46 additions and 25 deletions
+4 -5
View File
@@ -56,15 +56,12 @@ export function uiFieldText(field, context) {
input
.classed('disabled', !!isSuggestion)
.attr('readonly', isSuggestion || null)
.on('input', change(true))
.on('blur', change())
.on('change', change());
if (field.id === 'brand') {
selection.call(isSuggestion ? _brandTip : _brandTip.destroy);
}
if (field.type === 'tel' && nominatim && _entity) {
var center = _entity.extent(context.graph()).center();
nominatim.countryCode(center, function (err, countryCode) {
@@ -116,8 +113,10 @@ export function uiFieldText(field, context) {
// A "suggestion" preset (brand name)
// Put suggestion keys in `field.keys` so delete button can remove them all.
field.keys = Object.keys(preset.removeTags)
.filter(function(k) { return k !== pKey; });
.filter(function(k) { return k !== pKey && k !== 'name'; });
}
selection.call(isSuggestion ? _brandTip : _brandTip.destroy);
}
}