summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/field_utils_tests.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-05-05 13:50:46 +0200
committerqsm-odoo <qsm@odoo.com>2017-05-08 10:38:05 +0200
commitc1377f597205026e76d86ca5240ec7f4b6e1fbf1 (patch)
treea29aed470b25698169a39576780d396e7e4c62d1 /addons/web/static/tests/fields/field_utils_tests.js
parentc04b840a45edd222c50e74d18e2d02a3dd3175cd (diff)
[FIX] web: properly handle field navigation for all fields
Before this commit, only fields which were specializations of the `InputField` were handling up/right/down/left navigation in editable list view. As m2o field is not an `InputField` (yet?), it was not possible to navigate from one of those for example. Now, navigation events are handled by the `AbstractField` class. If a given field has to handle navigation a different way, it is its responsability to stop the associated navigation event. For example, `InputField` instances are stopping the left/right event if the cursor is not at the start/end of the <input/> element. Also, before this commit, there were many events ("move_down", "move_left", "move_next", ...). Now there is only one event for navigation: "navigation_move". This event is given a "direction" data ("left", "next", ...). It also comes with a "target" data which is a reference to the last `AbstractField` instance the navigation event has crossed.
Diffstat (limited to 'addons/web/static/tests/fields/field_utils_tests.js')
0 files changed, 0 insertions, 0 deletions