mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Don't clean fields (trim whitespace) on every input event
Fields only really need to be fully cleaned when the user leaves the field (onChange, onBlur) (closes #3045)
This commit is contained in:
@@ -184,8 +184,11 @@ iD.ui.EntityEditor = function(context) {
|
||||
function changeTags(changed, onInput) {
|
||||
var entity = context.entity(id),
|
||||
annotation = t('operations.change_tags.annotation'),
|
||||
tags = clean(_.extend({}, entity.tags, changed));
|
||||
tags = _.extend({}, entity.tags, changed);
|
||||
|
||||
if (!onInput) {
|
||||
tags = clean(tags);
|
||||
}
|
||||
if (!_.isEqual(entity.tags, tags)) {
|
||||
if (coalesceChanges) {
|
||||
context.overwrite(iD.actions.ChangeTags(id, tags), annotation);
|
||||
|
||||
Reference in New Issue
Block a user