diff options
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index f2cacb3327f..ae3080b3b8e 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -534,14 +534,17 @@ var FieldMany2One = AbstractField.extend({ * start/end of the input element. Stops any navigation move event if the * user is selecting text. * - * TODO this is a duplicate of InputField._onNavigationMove, maybe this - * should be done in a mixin or, better, the m2o field should be an - * InputField (but this requires some refactoring). - * * @private * @param {OdooEvent} ev */ - _onNavigationMove: basicFields.InputField.prototype._onNavigationMove, + _onNavigationMove: function (ev) { + // TODO Maybe this should be done in a mixin or, better, the m2o field + // should be an InputField (but this requires some refactoring). + basicFields.InputField.prototype._onNavigationMove.apply(this, arguments); + if (this.mode === 'edit' && $(this.$input.autocomplete('widget')).is(':visible')) { + ev.stopPropagation(); + } + }, /** * @private * @param {OdooEvent} event |
