[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).
This commit is contained in:
@@ -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');
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user