[FIX] web: allow onchange to modify origin field

With this commit, we allow an onchange coming from a field to modify the
same field.  This was not working for field widgets derived from an
input field.
This commit is contained in:
Géry Debongnie
2017-10-24 15:39:14 +02:00
parent d58d6e270f
commit 616eedb7e4
2 changed files with 37 additions and 1 deletions
@@ -206,7 +206,7 @@ var InputField = DebouncedField.extend({
if (!event || event === this.lastChangeEvent) {
this.isDirty = false;
}
if (this.isDirty || (event && event.target === this)) {
if (this.isDirty || (event && event.target === this && event.data.changes[this.name] === this.value)) {
return $.when();
} else {
return this._render();