[FIX] web: properly resize textarea when its value changes
Before this commit, a textarea would not resize when its value changed if the event was different than "input" or "focus". This commit fixes it by also listening to the "change" event, and by triggering it at appropriate times. PR: #26430 Task: 1869469
This commit is contained in:
@@ -1066,7 +1066,17 @@ var FieldText = InputField.extend(TranslatableFieldMixin, {
|
||||
}
|
||||
return this._super();
|
||||
},
|
||||
|
||||
/**
|
||||
* Override to force a resize of the textarea when its value has changed
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
reset: function () {
|
||||
var self = this;
|
||||
return $.when(this._super.apply(this, arguments)).then(function () {
|
||||
self.$input.trigger('change');
|
||||
});
|
||||
},
|
||||
//--------------------------------------------------------------------------
|
||||
// Handlers
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user