[FIX] web: new record on editable list
On an editable list view, an issue occurs with the following procedure: - Click "Add an item", write something - Press "Enter" key --> a new item is added, write something - Click outside of the list, then click on the last item created - Press "Enter" key --> the cursor is set at the beginning of the list This is an issue for two reasons. First, the behavior is not the same if we have clicked outside of the list before pressing "Enter", which is not logical. Then, in some undetermined cases, the focus can be lost then retrieved on the last record. It means that suddenly, the cursor goes back at the beginning of the list without notice. The latter issue is problematic when batch-encoding data, for example encoding the lot numbers of incoming products thanks to a scanner. opw-680758
This commit is contained in:
@@ -630,7 +630,10 @@ ListView.include(/** @lends instance.web.ListView# */{
|
||||
if (saveInfo.created) {
|
||||
return self.start_edition();
|
||||
}
|
||||
var record = self.records[next_record](saveInfo.record, {wraparound: true});
|
||||
var record = self.records[next_record](saveInfo.record);
|
||||
if (record === undefined) {
|
||||
return self.start_edition();
|
||||
}
|
||||
return self.start_edition(record, options);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user