[FIX] web: prevent handle from crashing with text field
289adeb63f introduced a bug where we tried to trigger an event on an element that didn't exist. Indeed there is no input if it's not in edit mode.
This commit fixes it.
PR: none
Task: none
This commit is contained in:
@@ -1079,7 +1079,9 @@ var FieldText = InputField.extend(TranslatableFieldMixin, {
|
||||
reset: function () {
|
||||
var self = this;
|
||||
return $.when(this._super.apply(this, arguments)).then(function () {
|
||||
self.$input.trigger('change');
|
||||
if (self.mode === 'edit') {
|
||||
self.$input.trigger('change');
|
||||
}
|
||||
});
|
||||
},
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user