summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/basic_fields_tests.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-09-13 16:09:33 +0200
committerAaron Bohy <aab@odoo.com>2018-09-17 13:32:37 +0200
commit4393e48fec93d2f0872f48bc4ad172b03c948c24 (patch)
tree37de1118bff7c01abb49404dd53376258eee903b /addons/web/static/tests/fields/basic_fields_tests.js
parent0354579c986d63b08eb85571602097c49afd1678 (diff)
[FIX] web: navigate in editable list with custom controls
Rev. f241441 recently added the possibiliy to define custom controls (instead of the single 'Add a line') in editable list views. However, it didn't take into account keyboard navigation. Suppose that the focus is on the field preceeding the list, and the user clicks on TAB, the code assumed that there was only one control, and focused it. However, when there were several control, the last one was focused (which is typically the less common one), and there was no way to navigate to the others. This rev. focuses the first control by default, and allows to navigate through controls with RIGHT and LEFT. Pressing TAB still moves out of the list, to the next field. Note that i'm not happy with this fix, as the logic doesn't seem to be in the right place. Indeed, the notion of controls is the concern of the editable list, not the x2many field, so the list should handle this logic by itself. Unfortenately, this is not that easy to change, as for now the list doesn't even know that we are navigating to/from its control(s), until we click on it/them. Changing that will be for later, in master. We also did a linting pass on the concerned code. Task 1878254
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions