From 324dbcde573a65081b59932bcdc023cb5878d2bb Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 27 Apr 2016 16:35:04 +0200 Subject: [PATCH] [FIX] web: editable list, up/down navigation on m2o The current behavior was allowing going on the previous row if the user is at the start of an editable element and on the next row if the user is at the end of an editable element. The problem was, we did not want this behavior when the editable element is a select or m2o (as the up and down input should open the select/m2o dropdown instead). --- addons/web/static/src/js/views/list_view_editable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/views/list_view_editable.js b/addons/web/static/src/js/views/list_view_editable.js index 00da5704784..32968d7e1f3 100644 --- a/addons/web/static/src/js/views/list_view_editable.js +++ b/addons/web/static/src/js/views/list_view_editable.js @@ -721,13 +721,13 @@ ListView.include(/** @lends instance.web.ListView# */{ keyup_UP: function (e) { var self = this; return this._key_move_record(e, 'pred', function (el, cursor) { - return self._at_start(cursor, el); + return self._at_start(cursor, el) && !$(el).is('select,.ui-autocomplete-input'); }); }, keyup_DOWN: function (e) { var self = this; return this._key_move_record(e, 'succ', function (el, cursor) { - return self._at_end(cursor, el); + return self._at_end(cursor, el) && !$(el).is('select,.ui-autocomplete-input'); }); },