From 2bf6e69e283841accecf2ded9ae06256dc065883 Mon Sep 17 00:00:00 2001 From: bluesoft83 Date: Fri, 3 Mar 2017 14:12:53 +0100 Subject: [PATCH] [FIX] web: keep focus field when navigating with keyboard When moving with keys up or down on editable list view, jumping of line was bringing the cusor back to the first cell. The cell focus is stored in the option dict (e.g. {'field_focus': 'name'}. Previous code was discarding the content of the given option dict to create a new one. Closes #15703 --- addons/web/static/src/js/views/list_view_editable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ef9bf1a6062..003b6f18d01 100644 --- a/addons/web/static/src/js/views/list_view_editable.js +++ b/addons/web/static/src/js/views/list_view_editable.js @@ -641,7 +641,7 @@ ListView.include(/** @lends instance.web.ListView# */{ if (saveInfo.created) { return self.start_edition(); } - var options = { wraparound: !self.is_action_enabled('create') }; + options.wraparound = !self.is_action_enabled('create'); var record = self.records[next_record](saveInfo.record, options); if (record === undefined) { return self.start_edition();