diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-04-11 16:40:53 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-13 14:31:24 +0200 |
| commit | 15f26cc263f7cf3e750f0a6173e948378bd65933 (patch) | |
| tree | 05351660d858510864f701b1194330adda2e71fc /addons/web/static/src/js/fields | |
| parent | 87ac617eb1418d5d5edba2e0aae99adb506c0f78 (diff) | |
[FIX] web: Many2ManyTags: keep focus after being edited
When a tag is either added or removed, the focus should remain
on the input.
Diffstat (limited to 'addons/web/static/src/js/fields')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index 496aaee06f0..42c959e2528 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -963,6 +963,17 @@ var FieldMany2ManyTags = AbstractField.extend({ isSet: function () { return !!this.value && this.value.count; }, + /** + * Reset the focus on this field if it was the origin of the onchange call. + * + * @override + */ + reset: function (record, event) { + this._super.apply(this, arguments); + if (event && event.target === this) { + this.activate(); + } + }, //-------------------------------------------------------------------------- // Private |
